Image processing device and image processing method

ABSTRACT

The present technology relates to an image processing device and an image processing method which allow a deblocking filtering process to apply filtering appropriately. A pixel (p 0   i ) of which the value is 255 (solid line) before a deblocking process changes greatly to 159 (dot line) after a conventional deblocking process. Therefore, a clipping process having a clipping value of 10 is performed in strong filtering, whereby the pixel (p 0   j ) of which the value is 255 (solid line) before the deblocking process becomes 245 (bold line). Thus, a change in the pixel value occurring in the conventional technique can be suppressed as much as possible. This disclosure can be applied to an image processing device, for example.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims the benefit of priorityunder 35 U.S.C. § 120 from U.S. application Ser. No. 14/123,375, filedDec. 2, 2013, the entire contents of which is incorporated herein byreference and which is a national stage of International Application No.PCT/JP2012/063606, filed May 28, 2012, which is based upon and claimsthe benefit of priority under 35 U.S.C. § 119 from prior Japanese PatentApplications No. 2011-143461, filed Jun. 28, 2011; No. 2011-240550,filed Nov. 1, 2011; No. 2011-243839, filed Nov. 7, 2011; No.2012-009326, filed Jan. 19, 2012.

TECHNICAL FIELD

This technique relates to an image processing device and an imageprocessing method. Specifically, this technique allows a deblockingfiltering process to apply filtering appropriately.

BACKGROUND ART

In recent years, devices, which handle image information as digitaldata, which, in such a case, aim to transmit and store information witha high efficiency, and which conform to a scheme, such as MPEG2(International Organization for Standardization and InternationalElectrotechnical Commission (ISO/IEC) 13818-2), for compressing imageinformation using orthogonal transformation, such as discrete cosinetransformation, and using motion compensation by utilizing redundancythat is unique to the image information have become widespread in bothinformation distribution in broadcasting stations and informationreception in ordinary homes. In addition, schemes called H.264 and MPEG4Part 10 (Advanced Video Coding (AVC) which require a larger amount ofoperation for coding and decoding but can realize a higher codingefficiency than MPEG2 or the like have been also used. Further,nowadays, standardization works for high efficiency video coding (HEVC)which is a next-generation image coding scheme are in progress so thatcompression, distribution, or the like of high-resolution images of4000×2000 pixels which is four times that of high-vision images can beperformed efficiently.

In the standardization works for high efficiency video coding (HEVC)which is a next-generation image coding scheme, JCTVC-A119 (seeNon-Patent Document 1 below) proposes to apply a deblocking filter toeach block having the size of 8×8 pixels or larger. In the methodproposed in JCTVC-A119, by increasing a minimum unit block size to whicha deblocking filter is to be applied, it is possible to execute afiltering process in parallel on a plurality of block boundaries in thesame direction within one macroblock.

CITATION LIST Non-Patent Document

-   Non-Patent Document 1: K. Ugur (Nokia), K. R. Andersson (LM    Ericsson), A. Fuldseth (Tandberg Telecom), “JCTVC-A119: Video coding    technology proposal by Tandberg, Nokia, and Ericsson,” Documents of    the first meeting of the Joint Collaborative Team on Video Coding    (JCT-vc), Dresden, Germany, 15-23 Apr. 2010

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

However, in the conventional deblocking filtering process, filtering isnot performed appropriately.

Therefore, an object of this technique is to allow a deblockingfiltering process to apply filtering appropriately.

Solutions to Problems

An image processing device according to a first aspect of this techniqueincludes: a decoding unit that decodes an encoded stream encoded inunits each having a layer structure to generate an image; a filteringunit that applies a deblocking filter to a block boundary according to astrength of the deblocking filter applied to the block boundary which isa boundary between a block of the image generated by the decoding unitand an adjacent block adjacent to the block; and a controller thatcontrols the filtering unit so that, when strong filtering is applied asthe strength of the deblocking filter, a clipping process is applied tothe deblocking filter with respect to luminance components of the imagegenerated by the decoding unit.

The controller may apply the clipping process to values of parts thatchange when the deblocking filter is applied.

The controller applies the clipping process according to the followingexpressions:p0_(i) =p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3);q0_(i) =q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p0_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3);p1_(i) =p1_(i)+Clip_((−pv)−(pv))((p2_(i)−3*p1_(i) +p0_(i)+q0_(i)+2)>>2);q1_(i) =q1_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)−3*q1_(i)+q2_(i)+2)>>2);p2_(i) =p2_(i)+Clip_((−pv)−(pv))((2*p2_(i)−5*p2_(i) +p1_(i) +p0_(i)+q0_(i)+4)>>3);q2_(i) =q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+p1_(i)−5*q2_(i)+2*q3_(i)+4)>>3);  [Mathematical formula 37]

where i=0, 7 and pv is a clipping value.

The controller may set a value that is integer multiples of parametersof the deblocking filter as the clipping value used when the clippingprocess is performed.

The controller may set a value that is twice the parameters of thedeblocking filter as the clipping value used when the clipping processis performed.

The image processing device further includes: a filter strengthdetermining unit that determines the strength of the deblocking filterapplied to the block boundary, and the filtering unit may apply thedeblocking filter to the block boundary according to the strengthdetermined by the filter strength determining unit, and the controllermay control the filtering unit so that, when the filter strengthdetermining unit determines that strong filtering is to be applied, aclipping process is applied to the deblocking filter with respect to theluminance components of the image generated by the decoding unit.

The filter strength determining unit may determine the strength of thedeblocking filter using a plurality of lines as processing units.

The filter strength determining unit may determine the strength of thedeblocking filter using four lines as the processing units.

The image processing device further includes: a filtering necessitydetermining unit that determines whether the deblocking filter is to beapplied to the block boundary using a plurality of lines as processingunits, and the filter strength determining unit may determine thestrength of the deblocking filter when the filtering necessitydetermining unit determines that the deblocking filter is to be applied.

An image processing method according to the first aspect of thistechnique allows an image processing device to execute: decoding anencoded stream encoded in units each having a layer structure togenerate an image; applying a deblocking filter to a block boundaryaccording to a strength of the deblocking filter applied to the blockboundary which is a boundary between a block of the generated image andan adjacent block adjacent to the block; and controlling so that, whenstrong filtering is applied as the strength of the deblocking filter, aclipping process is applied to the deblocking filter with respect toluminance components of the generated image.

An image processing device according to a second aspect of thistechnique includes: a filtering unit that applies a deblocking filter toa block boundary according to a strength of the deblocking filterapplied to the block boundary which is a boundary between a block of animage locally decoded when an image is encoded and an adjacent blockadjacent to the block; a controller that controls the filtering unit sothat, when strong filtering is applied as the strength of the deblockingfilter, a clipping process is applied to the deblocking filter withrespect to luminance components of the locally decoded image; and anencoding unit that encodes the image in units each having a layerstructure using an image to which the deblocking filter is applied.

The controller may apply the clipping process to values of parts thatchange when the deblocking filter is applied.

The controller applies the clipping process according to the followingexpressions:p0_(i) =p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3);q0_(i) =q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p0_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3);p1_(i) =p1_(i)+Clip_((−pv)−(pv))((p2_(i)−3*p1_(i) +p0_(i)+q0_(i)+2)>>2);q1_(i) =q1_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)−3*q1_(i)+q2_(i)+2)>>2);p2_(i) =p2_(i)+Clip_((−pv)−(pv))((2*p2_(i)−5*p2_(i) +p1_(i) +p0_(i)+q0_(i)+4)>>3);q2_(i) =q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+p1_(i)−5*q2_(i)+2*q3_(i)+4)>>3);  [Mathematical formula 38]

where i=0, 7 and pv is a clipping value.

The controller may set a value that is integer multiples of parametersof the deblocking filter as the clipping value used when the clippingprocess is performed.

The controller may set a value that is twice the parameters of thedeblocking filter as the clipping value used when the clipping processis performed.

The image processing device further includes: a filter strengthdetermining unit that determines the strength of the deblocking filterapplied to the block boundary, and the filtering unit may apply thedeblocking filter to the block boundary according to the strengthdetermined by the filter strength determining unit, and the controllermay control the filtering unit so that, when the filter strengthdetermining unit determines that strong filtering is to be applied, aclipping process is applied to the deblocking filter with respect to theluminance components of the image generated by the decoding unit.

The filter strength determining unit may determine the strength of thedeblocking filter using a plurality of lines as processing units.

The filter strength determining unit may determine the strength of thedeblocking filter using four lines as the processing units.

The image processing device further includes: a filtering necessitydetermining unit that determines whether the deblocking filter is to beapplied to the block boundary using a plurality of lines as processingunits, and the filter strength determining unit may determine thestrength of the deblocking filter when the filtering necessitydetermining unit determines that the deblocking filter is to be applied.

An image processing method according to the second aspect of thistechnique allows an image processing device to execute: applying adeblocking filter to a block boundary according to a strength of thedeblocking filter applied to the block boundary which is a boundarybetween a block of an image locally decoded when an image is encoded andan adjacent block adjacent to the block; controlling so that, whenstrong filtering is applied as the strength of the deblocking filter, aclipping process is applied to the deblocking filter with respect toluminance components of the locally decoded image; and encoding theimage in units each having a layer structure using an image to which thedeblocking filter is applied.

In a first aspect of the present technique, an encoded stream encoded inunits each having a layer structure is decoded to generate an image; anda deblocking filter is applied to a block boundary according to astrength of the deblocking filter applied to the block boundary which isa boundary between a block of the generated image and an adjacent blockadjacent to the block. Moreover, control is performed so that, whenstrong filtering is applied as the strength of the deblocking filter, aclipping process is applied to the deblocking filter with respect toluminance components of the generated image.

In a second aspect of the present technique, a deblocking filter isapplied to a block boundary according to a strength of the deblockingfilter applied to the block boundary which is a boundary between a blockof an image locally decoded when an image is encoded and an adjacentblock adjacent to the block. Moreover, control is performed so that,when strong filtering is applied as the strength of the deblockingfilter, a clipping process is applied to the deblocking filter withrespect to luminance components of the locally decoded image; and theimage is encoded in units each having a layer structure using an imageto which the deblocking filter is applied.

Effects of the Invention

According to this technique, it is possible to allow a deblockingfiltering process to apply filtering appropriately.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1(A) and 1(B) are diagrams for describing a conventionaldeblocking filtering process.

FIG. 2 is a diagram illustrating a configuration when applied to animage encoding device.

FIG. 3 is a flowchart illustrating an image encoding operation.

FIG. 4 is a flowchart illustrating an intra-prediction process.

FIG. 5 is a flowchart illustrating an inter-prediction process.

FIG. 6 is a diagram illustrating a configuration when applied to animage decoding device.

FIG. 7 is a flowchart illustrating an image decoding operation.

FIG. 8 is a diagram for describing a basic operation of a deblockingfiltering unit.

FIG. 9 is a diagram illustrating the configuration of a first embodimentof the deblocking filtering unit.

FIG. 10 is a flowchart illustrating the operation of the firstembodiment of the deblocking filtering unit.

FIG. 11 is a diagram illustrating the configuration of a filteroperation unit.

FIG. 12 is a diagram illustrating the configuration of the filteroperation unit.

FIGS. 13(A) and 13(B) are diagrams for describing the operation of thefilter operation unit.

FIGS. 14(A) and 14(B) are diagrams for describing the operation of thefilter operation unit.

FIG. 15 is a flowchart illustrating the operation of a fifth embodiment.

FIG. 16 is a diagram for describing a conventional deblocking filteringprocess.

FIG. 17 is a diagram for describing the present technique (sixthembodiment).

FIG. 18 is a diagram for describing the present technique (sixthembodiment).

FIG. 19 is a diagram illustrating pixels used in the deblockingfiltering process of the present technique.

FIG. 20 is a diagram for describing pixel values that change due toconventional strong filtering.

FIG. 21 is a diagram for describing the effects of clipping-based strongfiltering.

FIG. 22 is a diagram illustrating the configuration of a sixthembodiment of the deblocking filtering unit.

FIG. 23 is a flowchart illustrating the operation of the sixthembodiment of the deblocking filtering unit.

FIG. 24 is a diagram illustrating the configuration of a seventhembodiment of the deblocking filtering unit.

FIG. 25 is a diagram illustrating the configuration of an eighthembodiment of the deblocking filtering unit.

FIG. 26 is a flowchart illustrating the operation of the eighthembodiment of the deblocking filtering unit.

FIG. 27 is a flowchart for describing a luminance signal deblockingprocess.

FIG. 28 is a diagram for describing an example of the R3W2 case.

FIG. 29 is a diagram illustrating an example of a multi-view imageencoding scheme.

FIG. 30 is a diagram illustrating an example of main components of amulti-view image encoding device to which the present technique isapplied.

FIG. 31 is a diagram illustrating an example of main components of amulti-view image decoding device to which the present technique isapplied.

FIG. 32 is a diagram illustrating an example of a layer image encodingscheme.

FIG. 33 is a diagram illustrating an example of main components of alayer image encoding device to which the present technique is applied.

FIG. 34 is a diagram illustrating an example of main components of alayer image decoding device to which the present technique is applied.

FIG. 35 is a diagram illustrating an example of a schematicconfiguration of a television apparatus.

FIG. 36 is a diagram illustrating an example of a schematicconfiguration of a mobile phone.

FIG. 37 is a diagram illustrating an example of a schematicconfiguration of a recording/reproducing device.

FIG. 38 is a diagram illustrating an example of a schematicconfiguration of an imaging device.

MODE FOR CARRYING OUT THE INVENTION

Hereinafter, modes for carrying out the present technique will bedescribed. The description will be given in the following order:

1. Conventional art

2. Configuration when applied to image encoding device

3. Operation of image encoding device

4. Configuration when applied to image decoding device

5. Operation of image decoding device

6. Basic operation of deblocking filtering unit

7. First embodiment of deblocking filtering unit

8. Second embodiment of deblocking filtering unit

9. Third embodiment of deblocking filtering unit

10. Fourth embodiment of deblocking filtering unit

11. Fifth embodiment of deblocking filtering unit

12. Description of sixth to eighth embodiments

13. Sixth embodiment of deblocking filtering unit

14. Seventh embodiment of deblocking filtering unit

15. Eighth embodiment of deblocking filtering unit

16. Ninth embodiment

17. Tenth embodiment (multi-view image encoding and decoding device)

18. Eleventh embodiment (layer image encoding and decoding device)

19. Application example

1. Conventional Art

A conventional deblocking filtering process will be described withreference to FIGS. 1(A) and 1(B).

As illustrated in FIG. 1(A), for example, when a deblocking filteringprocess is performed in a raster order in respective largest codingunits (LCUs), image data corresponding to a predetermined number oflines from an inter-block boundary BB, of LCUu which is an upper blockis stored in a line memory, and a vertical filtering process isperformed using the image data and image data of LCUl which is a lowerblock obtained after the storing. For example, as illustrated in FIG.1(B), when filter operation is performed using image data correspondingto four lines from the boundary BB while using image data of the upperand lower blocks each corresponding to three lines from the inter-blockboundary BB as a processing range of the vertical filtering process,image data corresponding to four lines from the boundary BB, of LCUuwhich is the upper block is stored in the line memory. In the drawings,target pixels of the deblocking filter are depicted by double circles,and the upper and lower boundaries of the filter processing range of thedeblocking filter are indicated by “DBU” and “DBL,” respectively.

In this manner, since image data corresponding to a predetermined numberof lines from the inter-block boundary BB is stored in the line memoryso as to be used for the filter operation, if the number of pixels inthe horizontal direction increases, the memory capacity of the linememory increases.

2. Configuration when Applied to Image Encoding Device

FIG. 2 illustrates a configuration when the image processing device ofthe present technique is applied to an image encoding device. An imageencoding device 10 includes an analog/digital converter (A/D converter)11, a frame reordering buffer 12, a subtractor 13, an orthogonaltransformer 14, a quantizer 15, a lossless encoder 16, an accumulationbuffer 17, and a rate controller 18. The image encoding device 10further includes an inverse quantizer 21, an inverse orthogonaltransformer 22, an adder 23, a deblocking filtering unit 24, a framememory 25, a selector 26, an intra predictor 31, a motionestimator/compensator 32, and a predicted image/optimal mode selectingunit 33.

The A/D converter 11 converts an analog image signal into digital imagedata and outputs the digital image data to the frame reordering buffer12.

The frame reordering buffer 12 reorders the frames of the image dataoutput from the A/D converter 11. The frame reordering buffer 12performs the frame reorder according to a GOP (group of pictures)structure related to an encoding process and outputs the reordered imagedata to the subtractor 13, the intra predictor 31, and the motionestimator/compensator 32.

The subtractor 13 is supplied with the image data output from the framereordering buffer 12 and predicted image data selected by the predictedimage/optimal mode selecting unit 33 described later. The subtractor 13calculates prediction error data which is a difference between the imagedata output from the frame reordering buffer 12 and the predicted imagedata supplied from the predicted image/optimal mode selecting unit 33and outputs the prediction error data to the orthogonal transformer 14.

The orthogonal transformer 14 performs an orthogonal transform processsuch as discrete cosine transform (DCT) or Karhunen-Loeve transform withrespect to the prediction error data output from the subtractor 13. Theorthogonal transformer 14 outputs transform coefficient data obtained byperforming the orthogonal transform process to the quantizer 15.

The quantizer 15 is supplied with the transform coefficient data outputfrom the orthogonal transformer 14 and a rate control signal from therate controller 18 described later. The quantizer 15 quantizes thetransform coefficient data and outputs the quantized data to thelossless encoder 16 and the inverse quantizer 21. Moreover, thequantizer 15 switches a quantization parameter (quantization scale)based on the rate control signal from the rate controller 18 to change abit rate of the quantized data.

The lossless encoder 16 is supplied with the quantized data output fromthe quantizer 15 and prediction mode information from the intrapredictor 31, the motion estimator/compensator 32, and the predictedimage/optimal mode selecting unit 33 described later. The predictionmode information includes a macroblock type that allows a predictedblock size to be identified, a prediction mode, motion vectorinformation, reference picture information, and the like according tointra-prediction or inter-prediction. The lossless encoder 16 performs alossless encoding process such as, for example, variable-length encodingor arithmetic encoding on the quantized data to generate an encodedstream and outputs the encoded stream to the accumulation buffer 17.Moreover, the lossless encoder 16 losslessly encodes the prediction modeinformation to add the encoded prediction mode information to the headerinformation of the encoded stream.

The accumulation buffer 17 accumulates the encoded streams from thelossless encoder 16. Moreover, the accumulation buffer 17 outputs theaccumulated encoded streams at a transfer rate corresponding to atransmission line.

The rate controller 18 monitors a free space of the accumulation buffer17, generates a rate control signal according to the free space, andoutputs the rate control signal to the quantizer 15. The rate controller18 acquires information indicating the free space from the accumulationbuffer 17, for example. The rate controller 18 decreases the bit rate ofthe quantized data using the rate control signal when the free spacedecreases. Moreover, the rate controller 18 increases the bit rate ofthe quantized data using the rate control signal when the free space ofthe accumulation buffer 17 is sufficiently large.

The inverse quantizer 21 performs an inverse quantization process on thequantized data supplied from the quantizer 15. The inverse quantizer 21outputs transform coefficient data obtained by performing the inversequantization process to the inverse orthogonal transformer 22.

The inverse orthogonal transformer 22 outputs data obtained byperforming an orthogonal transform process on the transform coefficientdata supplied from the inverse quantizer 21 to the adder 23.

The adder 23 adds the data supplied from the inverse orthogonaltransformer 22 and the predicted image data supplied from the predictedimage/optimal mode selecting unit 33 to generate decoded image data andoutputs the decoded image data to the deblocking filtering unit 24 andthe frame memory 25.

The deblocking filtering unit 24 performs a filtering process forreducing block distortion occurring during image encoding. Thedeblocking filtering unit 24 performs a filtering process to removeblock distortion from the decoded image data supplied from the adder 23and outputs the image data having been subjected to the filteringprocess to the frame memory 25. Moreover, the deblocking filtering unit24 controls an image range used for a filter operation in a blockpositioned on the upper side of a boundary according to a boundarydetected by performing inter-block boundary detection in a verticaldirection. In this manner, by controlling the image range used forfilter operation, the deblocking filtering unit 24 allows a verticalfiltering process to be performed even when a memory capacity of theline memory that stores image data is reduced. The details thereof willbe described later.

The frame memory 25 maintains the decoded image data supplied from theadder 23 and the decoded image data having been subjected to thefiltering process, supplied from the deblocking filtering unit 24 asimage data of a reference image.

The selector 26 supplies the reference image data before the filteringprocess, read from the frame memory 25 to the intra predictor 31 inorder to perform intra-prediction. Moreover, the selector 26 suppliesthe reference image data having been subjected to the filtering process,read from the frame memory 25 to the motion estimator/compensator 32 inorder to perform inter-prediction.

The intra predictor 31 performs an intra-prediction process in allcandidate intra-prediction modes using the image data of an encodingtarget image output from the frame reordering buffer 12 and thereference image data before the filtering process, read from the framememory 25. Further, the intra predictor 31 calculates a cost functionvalue for each intra-prediction mode and selects an intra-predictionmode in which the calculated cost function value is the smallest (thatis, an intra-prediction mode in which best encoding efficiency isobtained) as an optimal intra-prediction mode. The intra predictor 31outputs predicted image data generated in the optimal intra-predictionmode, the prediction mode information on the optimal intra-predictionmode, and a cost function value in the optimal intra-prediction mode tothe predicted image/optimal mode selecting unit 33. Moreover, the intrapredictor 31 outputs the prediction mode information on theintra-prediction mode in the intra-prediction process in the respectiveintra-prediction modes to the lossless encoder 16 in order to obtain agenerated code amount used in calculation of the cost function value asdescribed later.

The motion estimator/compensator 32 performs a motionestimation/compensation process in all predicted block sizescorresponding to macroblocks. The motion estimator/compensator 32detects a motion vector using the reference image data having beensubjected to the filtering process, read from the frame memory 25 withrespect to each of the encoding target images of the respectivepredicted block sizes, read from the frame reordering buffer 12.Further, the motion estimator/compensator 32 performs a motioncompensation process on the decoded image based on the detected motionvector to generate a predicted image. Moreover, the motionestimator/compensator 32 calculates a cost function value for eachpredicted block size and selects a predicted block size in which thecalculated cost function value is the smallest (that is, a predictedblock size in which best encoding efficiency is obtained) as an optimalinter-prediction mode. The motion estimator/compensator 32 outputs thepredicted image data generated in the optimal inter-prediction mode, theprediction mode information on the optimal inter-prediction mode, andthe cost function value in the optimal inter-prediction mode to thepredicted image/optimal mode selecting unit 33. Moreover, the motionestimator/compensator 32 outputs the prediction mode information on theinter-prediction mode in the inter-prediction process in the respectivepredicted block sizes to the lossless encoder 16 in order to obtain agenerated code amount used in calculation of the cost function value.The motion estimator/compensator 32 also performs the prediction in askipped macroblock mode and a direct mode as the inter-prediction mode.

The predicted image/optimal mode selecting unit 33 compares the costfunction value supplied from the intra predictor 31 and the costfunction value supplied from the motion estimator/compensator 32 inrespective macroblock units and selects a mode in which the costfunction value is the smaller as an optimal mode in which best encodingefficiency is obtained. Moreover, the predicted image/optimal modeselecting unit 33 outputs predicted image data generated in the optimalmode to the subtractor 13 and the adder 23. Further, the predictedimage/optimal mode selecting unit 33 outputs the prediction modeinformation of the optimal mode to the lossless encoder 16. Thepredicted image/optimal mode selecting unit 33 may perform theintra-prediction or the inter-prediction in respective slice units.

An encoding unit in the claims includes the intra predictor 31 thatgenerates predicted image data, the motion estimator/compensator 32, thepredicted image/optimal mode selecting unit 33, the subtractor 13, theorthogonal transformer 14, the quantizer 15, the lossless encoder 16,and the like.

3. Operation of Image Encoding Device

FIG. 3 is a flowchart illustrating the operation of an image encodingprocess. In step ST11, the A/D converter 11 performs A/D conversion onan input image signal.

In step ST12, the frame reordering buffer 12 performs screen reorder.The frame reordering buffer 12 stores the image data supplied from theA/D converter 11 and reorders the respective pictures so that thepictures arranged in the display order are reordered in the encodingorder.

In step ST13, the subtractor 13 generates prediction error data. Thesubtractor 13 calculates a difference between the image data of theimages reordered in step ST12 and the predicted image data selected bythe predicted image/optimal mode selecting unit 33 to generateprediction error data. The prediction error data has a data amount thatis smaller than that of the original image data. Thus, it is possible tocompress the data amount as compared to when the image is encoded as itis. When the predicted image/optimal mode selecting unit 33 selects thepredicted image supplied from the intra predictor 31 and the predictedimage from the motion estimator/compensator 32 in respective sliceunits, the intra-prediction is performed in the slice in which thepredicted image supplied from the intra predictor 31 is selected.Moreover, the inter-prediction is performed in the slice in which thepredicted image from the motion estimator/compensator 32 is selected.

In step ST14, the orthogonal transformer 14 performs an orthogonaltransform process. The orthogonal transformer 14 performs orthogonaltransform on the prediction error data supplied from the subtractor 13.Specifically, orthogonal transform such as discrete cosine transform orKarhunen-Loeve transform is performed on the prediction error data, andtransform coefficient data is output.

In step ST15, the quantizer 15 performs a quantization process. Thequantizer 15 quantizes the transform coefficient data. When thequantization is performed, rate control is performed as will bedescribed in the process of step ST25.

In step ST16, the inverse quantizer 21 performs an inverse quantizationprocess. The inverse quantizer 21 performs inverse quantization on thetransform coefficient data quantized by the quantizer 15 according to aproperty corresponding to the property of the quantizer 15.

In step ST17, the inverse orthogonal transformer 22 performs anorthogonal transform process. The inverse orthogonal transformer 22performs inverse orthogonal transform on the transform coefficient datainverse-quantized by the inverse quantizer 21 according to a propertycorresponding to the property of the orthogonal transformer 14.

In step ST18, the adder 23 generates decoded image data. The adder 23adds the predicted image data supplied from the predicted image/optimalmode selecting unit 33 and the data after the inverse orthogonaltransform at the position corresponding to the predicted image togenerate decoded image data.

In step ST19, the deblocking filtering unit 24 performs a deblockingfiltering process. The deblocking filtering unit 24 performs filteringon the decoded image data output from the adder 23 to remove blockdistortion. Moreover, the deblocking filtering unit 24 is configured toperform a vertical filtering process even when the memory capacity ofthe line memory that stores the image data is reduced. Specifically, thedeblocking filtering unit 24 controls the image range used for a filteroperation in a block positioned on the upper side of a boundaryaccording to a boundary detected by performing inter-block boundarydetection in the vertical direction.

In step ST20, the frame memory 25 stores decoded image data. The framememory 25 stores the decoded image data before the deblocking filteringprocess.

In step ST21, the intra predictor 31 and the motionestimator/compensator 32 perform prediction processes. That is, theintra predictor 31 performs an intra-prediction process in theintra-prediction mode and the motion estimator/compensator 32 performs amotion estimation/compensation process in the inter-prediction mode. Bythis process, the prediction processes are performed in all candidateprediction modes, and the cost function values in all candidateprediction modes are calculated. The optimal intra-prediction mode andthe optimal inter-prediction mode are selected based on the calculatedcost function values, and the predicted image generated in the selectedprediction mode and the cost function and the prediction modeinformation are supplied to the predicted image/optimal mode selectingunit 33.

In step ST22, the predicted image/optimal mode selecting unit 33 selectspredicted image data. The predicted image/optimal mode selecting unit 33determines an optimal mode in which best encoding efficiency is obtainedbased on the respective cost function values output from the intrapredictor 31 and the motion estimator/compensator 32. Further, thepredicted image/optimal mode selecting unit 33 selects the predictedimage data in the determined optimal mode and supplies the predictedimage data to the subtractor 13 and the adder 23. The predicted image isused for the operation in steps ST13 and ST18 as described above.

In step ST23, the lossless encoder 16 performs a lossless encodingprocess. The lossless encoder 16 performs lossless encoding on thequantized data output from the quantizer 15. That is, lossless encodingsuch as variable-length encoding or arithmetic encoding is performed onthe quantized data whereby the quantized data is compressed. In thiscase, in step ST22 described above, the prediction mode information (forexample, including the macroblock type, the prediction mode, the motionvector information, the reference picture information, and the like)input to the lossless encoder 16 is also subjected to lossless encoding.Further, lossless encoding data of the prediction mode information isadded to the header information of the encoded stream generated bylosslessly encoding the quantized data.

In step ST24, the accumulation buffer 17 performs an accumulationprocess to accumulate the encoded stream. The encoded stream accumulatedin the accumulation buffer 17 is appropriately read and is transmittedto a decoding side via a transmission line.

In step ST25, the rate controller 18 performs rate control. The ratecontroller 18 controls the rate of the quantization operation of thequantizer 15 so that an overflow or an underflow does not occur in theaccumulation buffer 17 when the accumulation buffer 17 accumulates theencoded stream.

Next, the prediction process in step ST21 of FIG. 3 will be described.The intra predictor 31 performs an intra-prediction process. The intrapredictor 31 performs intra-prediction on the image of a current blockin all candidate intra-prediction modes. The image data of a referenceimage referenced in the intra-prediction is not subjected to thefiltering process of the deblocking filtering unit 24, but the referenceimage data stored in the frame memory 25 is used. Although the detailsof the intra-prediction process are described later, by this process,intra-prediction is performed in all candidate intra-prediction modes,and the cost function values in all candidate intra-prediction modes arecalculated. Moreover, one intra-prediction mode in which best encodingefficiency is obtained is selected from all intra-prediction modes basedon the calculated cost function values. The motion estimator/compensator32 performs an inter-prediction process. The motionestimator/compensator 32 performs an inter-prediction process in allcandidate inter-prediction modes (all predicted block sizes) using thereference image data having been subjected to the filtering process,stored in the frame memory 25. Although the details of theinter-prediction process are described later, by this process, theprediction process is performed in all candidate inter-prediction modes,and the cost function values in all candidate inter-prediction modes arecalculated. Moreover, one inter-prediction mode in which best encodingefficiency is obtained is selected from all inter-prediction modes basedon the calculated cost function values.

The intra-prediction process will be described with reference to theflowchart of FIG. 4. In step ST31, the intra predictor 31 performsintra-prediction in the respective prediction modes. The intra predictor31 generates predicted image data in each intra-prediction mode usingthe decoded image data before the filtering process, stored in the framememory 25.

In step ST32, the intra predictor 31 calculates the cost function valuesof the respective prediction modes. For example, the lossless encodingprocess is performed tentatively in all candidate prediction modes, thecost function value expressed by Expression (1) below is calculated inthe respective prediction modes.Cost(Mode∈Ω)=D+λ/R  (1)

Here, “Ω” represents a universal set of candidate prediction modes forencoding blocks and macroblocks. “D” represents differential energy(distortion) between a decoded image and an input image when encoding isperformed in a prediction mode. “R” represents a generated code amountincluding orthogonal transform coefficients, prediction modeinformation, and the like, and “λ” represents the Lagrange multipliergiven as a function of a quantization parameter QP.

Moreover, with respect to all candidate prediction modes, the predictedimages are generated and header bits such as motion vector informationand prediction mode information are calculated, and the cost functionvalue expressed by Expression (2) below is calculated in the respectiveprediction modes.Cost(Mode∈Ω)=D+QPtoQuant(QP)·Header_Bit  (2)

Here, “Ω” represents a universal set of candidate prediction modes forencoding blocks and macroblocks. “D” represents differential energy(distortion) between a decoded image and an input image when encoding isperformed in a prediction mode. “Header_Bit” is a header bit of aprediction mode, and “QPtoQuant” is a function given as a function of aquantization parameter QP.

In step ST33, the intra predictor 31 determines an optimalintra-prediction mode. The intra predictor 31 selects oneintra-prediction mode in which the calculated cost function value is thesmallest based on the cost function values calculated in step ST32 anddetermines the intra-prediction mode as the optimal intra-predictionmode.

Next, the inter-prediction process will be described with reference tothe flowchart of FIG. 5. In step ST41, the motion estimator/compensator32 determines a motion vector and a reference image in the respectiveprediction modes. That is, the motion estimator/compensator 32determines the motion vector and the reference image of a current blockof the respective prediction modes.

In step ST42, the motion estimator/compensator 32 performs motioncompensation in the respective prediction modes. The motionestimator/compensator 32 performs motion compensation on the referenceimage based on the motion vector determined in step ST41 in therespective prediction modes (respective predicted block sizes) andgenerates predicted image data in the respective prediction modes.

In step ST43, the motion estimator/compensator 32 generates motionvector information in the respective prediction modes. The motionestimator/compensator 32 generates motion vector information included inthe encoded stream with respect to the motion vectors determined in therespective prediction modes. For example, a predicted motion vector isdetermined using median prediction and motion vector informationindicating a difference between the motion vector detected by motionestimation and the predicted motion vector is generated. The motionvector information generated in this manner is also used in calculationof the cost function value in the next step ST44, and when thecorresponding predicted image is ultimately selected by the predictedimage/optimal mode selecting unit 33, the motion vector information isincluded in the prediction mode information and output to the losslessencoder 16.

In step ST44, the motion estimator/compensator 32 calculates the costfunction value in the respective inter-prediction modes. The motionestimator/compensator 32 calculates the cost function value usingExpression (1) or (2) described above.

In step ST45, the motion estimator/compensator 32 determines an optimalinter-prediction mode. The motion estimator/compensator 32 selects oneprediction mode in which the calculated cost function value is thesmallest based on the cost function values calculated in step ST44.

4. Configuration when Applied to Image Decoding Device

The encoded stream generated by encoding an input image is supplied toan image decoding device via a predetermined transmission line, arecording medium, or the like and is decoded.

FIG. 6 illustrates the configuration of an image decoding device. Animage decoding device 50 includes an accumulation buffer 51, a losslessdecoder 52, an inverse quantizer 53, an inverse orthogonal transformer54, an adder 55, a deblocking filtering unit 56, a frame reorderingbuffer 57, and a D/A converter 58. The image decoding device 50 furtherincludes a frame memory 61, selectors 62 and 65, an intra predictor 63,and a motion compensation unit 64.

The accumulation buffer 51 accumulates encoded streams transmittedthereto. The lossless decoder 52 decodes the encoded streams suppliedfrom the accumulation buffer 51 according to a scheme corresponding tothe encoding scheme of the lossless encoder 16 of FIG. 2. Moreover, thelossless decoder 52 outputs prediction mode information obtained bydecoding the header information of the encoded streams to the intrapredictor 63 and the motion compensation unit 64.

The inverse quantizer 53 performs inverse quantization on the quantizeddata decoded by the lossless decoder 52 according to a schemecorresponding to the quantization scheme of the quantizer 15 of FIG. 2.The inverse orthogonal transformer 54 performs inverse orthogonaltransform on the output of the inverse quantizer 53 according to ascheme corresponding to the orthogonal transform scheme of theorthogonal transformer 14 of FIG. 2 and outputs the output to the adder55.

The adder 55 adds the data after the inverse orthogonal transform andthe predicted image data supplied from the selector 65 to generatedecoded image data and outputs the decoded image data to the deblockingfiltering unit 56 and the frame memory 61.

The deblocking filtering unit 56 performs a filtering process on thedecoded image data supplied from the adder 55 similarly to thedeblocking filtering unit 24 of FIG. 2 to remove block distortion andoutputs the decoded image data to the frame reordering buffer 57 and theframe memory 61.

The frame reordering buffer 57 performs screen reorder. That is, theframes reordered from the encoding order used in the frame reorderingbuffer 12 of FIG. 2 are reordered in the original display order and areoutput to the D/A converter 58.

The D/A converter 58 performs D/A conversion on the image data suppliedfrom the frame reordering buffer 57 and outputs the image data to adisplay (not illustrated) to thereby display images.

The frame memory 61 maintains the decoded image data before thefiltering process, supplied from the adder 55 and the decoded image datahaving been subjected to the filtering process, supplied from thedeblocking filtering unit 56 as image data of a reference image.

The selector 62 supplies the reference image data before the filteringprocess, read from the frame memory 61 to the intra predictor 63 when apredicted block having been subjected to intra-prediction is decodedbased on the prediction mode information supplied from the losslessdecoder 52. Moreover, the selector 26 supplies the reference image datahaving been subjected to the filtering process, read from the framememory 61 to the motion compensation unit 64 when a predicted blockhaving been subjected to inter-prediction is decoded based on theprediction mode information supplied from the lossless decoder 52.

The intra predictor 63 generates predicted images based on theprediction mode information supplied from the lossless decoder 52 andoutputs the generated predicted image data to the selector 65.

The motion compensation unit 64 performs motion compensation based onthe prediction mode information supplied from the lossless decoder 52 togenerate predicted image data and outputs the predicted image data tothe selector 65. That is, the motion compensation unit 64 performsmotion compensation using a motion vector based on the motion vectorinformation with respect to the reference image indicated by thereference frame information based on the motion vector information andthe reference frame information included in the prediction modeinformation to generate predicted image data.

The selector 65 supplies the predicted image data generated by the intrapredictor 63 to the adder 55. Moreover, the selector 65 supplies thepredicted image data generated by the motion compensation unit 64 to theadder 55.

A decoding unit in the claims includes the lossless decoder 52, theinverse quantizer 53, the inverse orthogonal transformer 54, the adder55, the intra predictor 63, the motion compensation unit 64, and thelike.

5. Operation of Image Decoding Device

Next, an image processing device performed by the image decoding device50 will be described with reference to the flowchart of FIG. 7.

In step ST51, the accumulation buffer 51 accumulates encoded streamstransferred thereto. In step ST52, the lossless decoder 52 performs alossless decoding process. The lossless decoder 52 decodes the encodedstreams supplied from the accumulation buffer 51. That is, the quantizeddata of the respective pictures encoded by the lossless encoder 16 ofFIG. 2 is obtained. Moreover, the lossless decoder 52 performs losslessdecoding on the prediction mode information included in the headerinformation of the encoded stream to obtain prediction mode informationand supplies the prediction mode information to the deblocking filteringunit 56 and the selectors 62 and 65. Further, the lossless decoder 52outputs the prediction mode information to the intra predictor 63 whenthe prediction mode information is information on the intra-predictionmode. In addition, the lossless decoder 52 outputs the prediction modeinformation to the motion compensation unit 64 when the prediction modeinformation is information on the inter-prediction mode.

In step ST53, the inverse quantizer 53 performs an inverse quantizationprocess. The inverse quantizer 53 performs inverse quantization on thequantized data decoded by the lossless decoder 52 according to aproperty corresponding to the property of the quantizer 15 of FIG. 2.

In step ST54, the inverse orthogonal transformer 54 performs anorthogonal transform process. The inverse orthogonal transformer 54performs inverse orthogonal transform on the transform coefficient datainverse-quantized by the inverse quantizer 53 according to a propertycorresponding to the property of the orthogonal transformer 14 of FIG.2.

In step ST55, the adder 55 generates decoded image data. The adder 55adds the data obtained by performing the orthogonal transform processand the predicted image data selected in step ST59 described later togenerate the decoded image data. In this manner, the original image isdecoded.

In step ST56, the deblocking filtering unit 56 performs a deblockingfiltering process. The deblocking filtering unit 56 performs a filteringprocess on the decoded image data output by the adder 55 to remove blockdistortion included in the decoded image.

In step ST57, the frame memory 61 stores the decoded image data.

In step ST58, the intra predictor 63 and the motion compensation unit 64perform a prediction process. The intra predictor 63 and the motioncompensation unit 64 perform the prediction process on the predictionmode information supplied from the lossless decoder 52.

That is, when the prediction mode information of the intra-prediction issupplied from the lossless decoder 52, the intra predictor 63 performsan intra-prediction process based on the prediction mode information togenerate the predicted image data. Moreover, when the prediction modeinformation of the inter-prediction is supplied from the losslessdecoder 52, the motion compensation unit 64 performs motion compensationbased on the prediction mode information to generate the predicted imagedata.

In step ST59, the selector 65 selects predicted image data. That is, theselector 65 selects the predicted image supplied from the intrapredictor 63 and the predicted image data generated by the motioncompensation unit 64 and supplies the predicted image and the predictedimage data to the adder 55 so as to be added to the output of theinverse orthogonal transformer 54 in step ST55 as described above.

In step ST60, the frame reordering buffer 57 performs screen reorder.That is, the frame reordering buffer 57 reorders the frames so that theframes reordered in the encoding order used in the frame reorderingbuffer 12 of the image encoding device 10 of FIG. 2 are reordered in theoriginal display order.

In step ST61, the D/A converter 58 performs D/A conversion on the imagedata from the frame reordering buffer 57. This image is output to adisplay (not illustrated) and the image is displayed.

6. Basic Operation of Deblocking Filtering Unit

In general, a deblocking filtering process according to an imageencoding scheme such as H.264/AVC or HEVC involves determining whetherfiltering is necessary or not and performing a filtering process withrespect to an inter-block boundary in which filtering is determined tobe necessary.

The inter-block boundary includes boundaries (that is, horizontallyadjacent inter-block boundaries (hereinafter referred to as “verticalboundaries”) detected by performing inter-block boundary detection inthe horizontal direction. Moreover, the inter-block boundary includesinter-block boundaries (that is, vertically adjacent inter-blockboundaries (hereinafter referred to as “line boundaries”) detected byperforming inter-block boundary detection in the vertical direction.

FIG. 8 is an explanatory diagram illustrating an example of pixels intwo blocks BKa and BKb adjacent with a boundary interposed. In thisexample, although a vertical boundary is used as an example, the samecan be applied to a line boundary. In the example of FIG. 8, image dataof pixels in the block BKa is represented by symbol “pi,j.” Here, “i” isa column index of pixel and “j” is a row index of pixel. Moreover, asmallest unit of the encoding process is a block of 8×8 pixels, andcolumn indexes “i” of 0, 1, 2, and 3 are assigned sequentially (fromleft to right) from the column close to the vertical boundary. Rowindexes “j” of 0, 1, 2, . . . , and 7 are assigned from top to bottom.The left half of the block BKa is omitted in the drawing. On the otherhand, image data of pixels in the block BKb is represented by symbol“qk,j.” Here, “k” is a column index of pixel and “j” is a row index ofpixel. The column indexes “k” of 0, 1, 2, and 3 are assignedsequentially (from left to right) from the column close to the verticalboundary. The right half of the block BKb is also omitted in thedrawing.

When it is determined that a deblocking filter is to be applied to aboundary and the boundary is a vertical boundary, for example, afiltering process is performed on the pixels on the left and right sidesof the boundary. As for luminance components, a filter having strongfilter strength and a filter having weak filter strength are switchedaccording to the value of image data.

[Luminance Component Filtering]

In selecting of strength, whether the conditions of Expressions (3) to(5) are satisfied is determined for each line (or each column). A strongfilter is selected when all conditions of Expressions (3) to (5) aresatisfied, and a weak filter is selected when the conditions of any oneof the expressions are not satisfied.[Mathematical formula 1]d<(β>>2)  (3)|p ₃ −p ₀ |+|q ₀ −q ₃|<(β>>3)  (4)|p ₀ −q ₀|<((5*t _(C)+1)>>1)  (5)

In Expression (3), “d” is a value calculated based on Expression (6).Moreover, “β” in Expressions (4) and (5) and “tc” in Expression (5) arevalues that are set based on a quantization parameter Q as indicated inTable 1. Additionally, in expressions (4) and (5), because theexpressions assume a common row index or common column index for allpixel values, image data of pixels represented by symbol “p_(i),” where“i” is a column index of a pixel when the row is constant, or p_(j),where “j” is the row index of a pixel when the column is constant.[Mathematical formula 2]d=|p _(2,2)−2*p _(1,2) +p _(0,2) |+|q _(2,2)−2*q _(1,2) +q _(0,2) |+|p_(2,5)−2*p _(1,5) +p _(0,5) |+|q _(2,5)−2*q _(1,5) +q _(0,5)|  (6)

TABLE 1 Q 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 β 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 6 7 8 t_(C) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Q 1920 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 β 9 10 11 12 13 1415 16 17 18 20 22 24 26 28 30 32 34 36 t_(C) 1 1 1 1 1 1 1 1 2 2 2 2 3 33 3 4 4 4 Q 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 β 3840 42 44 46 48 50 52 54 56 58 60 62 64 64 64 64 64 t_(C) 5 5 6 6 7 8 9 910 10 11 11 12 12 13 13 14 14

In weak filtering, the luminance components of the respective pixels ina filter processing range are calculated by performing the operations ofExpressions (7) to (11).[Mathematical formula 3]p ₁′=Clip1_(Y)(p ₁+Δ/2)  (7)p ₀′=Clip1_(Y)(p ₀+Δ)  (8)q ₀′=Clip1_(Y)(q ₀+Δ)  (9)q ₁′=Clip1_(Y)(q ₁+Δ/2)  (10)Δ=Clip3(−t _(C) ,t _(C),(13*(q ₀ −p ₀)+4*(q ₁ −p ₁)−5*(q ₂ −p₀)+16)>>5)  (11)

In strong filtering, the luminance components of the respective pixelsin a filter processing range are calculated by performing the operationsof Expressions (12) to (18).[Mathematical formula 4]p ₂′=Clip1_(Y)((2*p ₃+3*p ₂ +p ₁ +p ₀ +q ₀+4)>>3)  (12)p ₁′=Clip1_(Y)((p ₂ +p ₁ +p ₀ +q ₀+2)>>2)  (13)p ₀′=Clip1_(Y)((p ₂+2*p ₁+2*p ₀+2*q ₀ +q ₁+4)>>3)  (14)p ₀′=Clip1_(Y)((p ₂+2*p ₁+2*p ₀+2*q ₀ +q ₁+4)>>3)  (15)q ₀′=Clip1_(Y)((p ₁+2*p ₀+2*q ₀+2*q ₁ +q ₂+4)>>3)  (16)q ₁′=Clip1_(Y)((p ₀ +q ₀ +q ₁ +q ₂+2)>>2)  (17)q ₂′=Clip1_(Y)((p ₀ +q ₀ +q ₁+3*q ₂+2*q ₃+4)>>3)  (18)

Moreover, in filtering of chrominance components, the chrominancecomponents of the respective pixels in a filter processing range arecalculated by performing the operations of Expressions (19) to (21).[Mathematical formula 5]p ₀′=Clip1_(C)(p ₀+Δ)  (19)q ₀′=Clip1_(C)(q ₀−Δ)  (19)Δ=Clip3(−t _(C) ,t _(C),((((q ₀ −p ₀)<<2)+p ₁ −q ₁+4)>>3)  (21)

In the above expressions, “Clip1Y” and “Clip1 c” represent operations ofExpressions (22) and (23), and “Clip3(x,y,z)” in Expressions (22) and(23) represents a value determined by Expression (24).

$\begin{matrix}\left\lbrack {{Mathematical}\mspace{14mu}{formula}\mspace{14mu} 6} \right\rbrack & \; \\{{{Clip}\; 1_{Y}(x)} = {{Clip}\; 3\left( {0,{\left( {1 ⪡ {BitDepth}_{Y}} \right) - 1},x} \right)}} & (22) \\{{{Clip}\; 1_{C}(x)} = {{Clip}\; 3\left( {0,{\left( {1 ⪡ {BitDepth}_{C}} \right) - 1},x} \right)}} & (23) \\{{{Clip}\; 3\left( {x,y,z} \right)} = \left\{ \begin{matrix}{x;} & {z < x} \\{y;} & {z > y} \\{z;} & {otherwise}\end{matrix} \right.} & (24)\end{matrix}$

Moreover, as for the line boundary, the operation performed for eachline using the pixels in the horizontal direction at the verticalboundary is performed for each column using the pixels in the verticaldirection, and the filtering process is performed.

In the deblocking filtering process, a process that requires a linememory is the vertical filtering process, and hereinafter, a reductionin the memory capacity of the line memory in the vertical filteringprocess will be described in detail. Since the deblocking filtering unit24 of the image encoding device 10 has the same configuration andperforms the same operation as those of the deblocking filtering unit 56of the image decoding device 50, the deblocking filtering unit 24 onlywill be described.

7. First Embodiment of Deblocking Filtering Unit

FIG. 9 illustrates the configuration of a first embodiment of thedeblocking filtering unit. The deblocking filtering unit 24 includes aline memory 241, a line boundary detecting unit 242, a filter strengthdetermining unit 243, a coefficient memory 244, a filter operation unit245, and a filter controller 246.

The line memory 241 stores image data supplied from the adder 23 basedon a control signal from the filter controller 246. Moreover, the linememory 241 reads the image data stored therein and outputs the readimage data to the line boundary detecting unit 242, the filter strengthdetermining unit 243, and the filter operation unit 245.

The line boundary detecting unit 242 detects a line boundary in whichthe vertical filtering process is performed. The line boundary detectingunit 242 performs the filtering necessity determining process for eachblock using the image data supplied from the adder 23 and the image dataread from the line memory 241 and detects a line boundary in which thevertical filtering process is performed. The line boundary detectingunit 242 outputs the detection results to the filter strengthdetermining unit 243.

The filter strength determining unit 243 determines the filter strengthas described above. The filter strength determining unit 243 determineswhether the vertical filtering process is to be performed in a strongfiltering mode or a weak filtering mode using the image data of twoblocks adjacent with the line boundary interposed in which the verticalfiltering process is performed, and outputs the determination results tothe filter operation unit 245.

The coefficient memory 244 stores filter coefficients used in thefiltering operation of the deblocking filtering process.

The filter operation unit 245 performs a filtering operation with thefilter strength determined by the filter strength determining unit 243using the image data supplied from the adder 23, the image data storedin the line memory 241, and the filter coefficients read from thecoefficient memory 244. The filter operation unit 245 outputs the imagedata having been subjected to the vertical filtering process to theframe memory 25. Moreover, the filter operation unit 245 controls animage range used in the filtering operation in a block that ispositioned on the upper side of the line boundary based on the blockboundary determination result supplied from the filter controller 246.

The filter controller 246 controls the line memory 241 so as to storeimage data corresponding to a predetermined number of lines on the lowerside in the block. Moreover, the filter controller 246 reads the imagedata stored in the line memory 241. Further, the filter controller 246includes a line boundary determining unit 2461. The line boundarydetermining unit 2461 determines whether a boundary is a line boundary(for example, inter-LCU line boundary) in respective block units inwhich the process is sequentially performed in a raster scan directionand outputs the determination results to the filter operation unit 245.The filter operation unit 245 performs controls such that the verticalfiltering process can be performed even when the memory capacity of theline memory is reduced.

FIG. 10 illustrates the operation of the first embodiment of thedeblocking filtering unit. In step ST71, the deblocking filtering unit24 detects a line boundary. The deblocking filtering unit 24 detects aline boundary in which the vertical filtering process is performed.

In step ST72, the deblocking filtering unit 24 determines a filterstrength. The deblocking filtering unit 24 determines whether a strongfiltering mode or a weak filtering mode will be used for the lineboundary in which the vertical filtering process is performed.

In step ST73, the deblocking filtering unit 24 determines whether theboundary in which the vertical filtering process is performed is aninter-LCU line boundary. The deblocking filtering unit 24 proceeds tostep ST74 when the boundary in which the vertical filtering process isperformed is the inter-LCU line boundary and proceeds to step ST75 whenthe boundary is not the inter-LCU line boundary.

In step ST74, the deblocking filtering unit 24 performs a range-reducedvertical filtering process. The deblocking filtering unit 24 performsthe vertical filtering process while reducing the image range used forthe filtering operation of the upper adjacent LCU and the flow proceedsto step ST76.

In step ST75, the deblocking filtering unit 24 performs a normalvertical filtering process. The deblocking filtering unit 24 performsthe vertical filtering process using predetermined taps and coefficientswithout reducing the image range used for the filtering operation andthe flow proceeds to step ST76.

In step ST76, the deblocking filtering unit 24 determines whether thevertical filtering process at the boundary has been completed. When thevertical filtering process for the respective columns of the boundaryhas not been completed, the deblocking filtering unit 24 returns to stepST76 and performs the process for the next column. Moreover, when thevertical filtering process for the respective columns of the boundaryhas been completed, the flow proceeds to step ST77.

In step ST77, the deblocking filtering unit 24 determines whether theprocess has been completed up to the end of the screen. When the processhas not been completed up to the end of the screen, the deblockingfiltering unit 24 returns to step ST71, detects a new boundary andperforms the vertical filtering process. When the process has beencompleted up to the end of the screen, the deblocking filtering unit 24ends the process for 11 screens.

[Configuration and Operation of Filter Operation Unit]

FIGS. 11 and 12 illustrate the configuration of the filter operationunit. When a tap-changeable vertical filtering process is performed, thefilter operation unit 245 changes the image data of a tap or changes thenumber of taps such that the vertical filtering process can be performedeven when the number of lines that store image data is reduced. FIG. 11illustrates the configuration of a filter operation unit when a verticalfiltering process is performed while changing the image data of a tap.Moreover, FIG. 12 illustrates the configuration of a filter operationunit when a vertical filtering process is performed while changing thenumber of taps.

In FIG. 11, the filter operation unit 245 includes a data storage unit2451, a data selecting unit 2452, and an arithmetic processing unit2453.

When the memory capacity of a line memory is reduced, the data storageunit 2451 stores image data to be used for a tap at the position of thereduced line. The data storage unit 2451 outputs the image data storedtherein to the data selecting unit 2452 as the image data of a tap atthe position of the reduced line.

The data selecting unit 2452 selects one of the image data stored in thedata storage unit 2451 and the image data stored in the line memory andoutputs the selected image data to the arithmetic processing unit 2453.

The arithmetic processing unit 2453 performs an arithmetic process usingthe image data supplied from the adder 23 and the data selecting unit2452 and the filter coefficients read from the coefficient memory 244 togenerate image data after the vertical filtering process and outputs theimage data to the frame memory 25.

In FIG. 12, the filter operation unit 245 includes an arithmeticprocessing unit 2455 and an arithmetic processing unit 2456.

The arithmetic processing unit 2455 performs an arithmetic process witha predetermined number of taps and outputs image data after the verticalfiltering process to the data selecting unit 2457.

The arithmetic processing unit 2456 performs an arithmetic processwithout using the image data of the reduced line by reducing the numberof taps according to a reduction in the memory capacity of the linememory and outputs the image data after the vertical filtering processto the data selecting unit 2457.

The data selecting unit 2457 selects the image data depending on whetherthe boundary is an inter-LCU line boundary. When the boundary is not theboundary between LCUs, the data selecting unit 2457 selects the imagedata output from the arithmetic processing unit 2455. Moreover, when theboundary is the inter-LCU line boundary, the data selecting unit 2457selects the image data output from the arithmetic processing unit 2456.

FIGS. 13(A) and 13(B) are diagrams for describing the operation of thefilter operation unit 245. The drawings illustrate the image data ofrespective pixels of two adjacent blocks BKu and BKl. Here, thefiltering operation is performed using three pixels each from a boundary(line boundary) BB as a filter processing range of the verticalfiltering process and four pixels each from the boundary BB as a tap.When it is determined that the filtering is to be performed in a strongfiltering mode, the operations of Expressions (12) to (18) describedabove are performed for each column by the arithmetic processing units2453 and 2455. Moreover, when it is determined that the filtering is tobe performed in a weak filtering mode, the operations of Expressions (7)to (10) described above are performed for each column by the arithmeticprocessing units 2453 and 2455.

When the deblocking filtering process is performed in a raster order inrespective LCU units, it is determined that the vertical filteringprocess is performed in a strong filtering mode, and the operations ofExpressions (12) to (18) described above are performed. Thus, asillustrated in FIG. 13(A), the image data of the block BKu on the upperside of the boundary BB corresponding to four lines from the boundary BBneeds to be stored in the line memory.

Here, the filter operation unit 245 controls the image range used forthe filtering operation in the block positioned on the upper side of theboundary BB whereby the vertical filtering process can be performed evenwhen the memory capacity of the line memory is reduced. For example, asillustrated in FIG. 13(B), image data corresponding to three lines fromthe boundary BB is stored, and the vertical filtering process isperformed using the stored image data. That is, the arithmeticprocessing unit 2453 illustrated in FIG. 11 performs the operation ofExpression (25). Moreover, the arithmetic processing unit 2456illustrated in FIG. 12 performs the operation of Expression (26), andthe data selecting unit 2457 selects the image data from the arithmeticprocessing unit 2456 and outputs the image data. In Expressions (25) and(26), “i” indicates a column index of pixel, and when the filteringprocess is performed in units of blocks of 8×8 pixels, “i=0 to V.”[Mathematical formula 7]p _(2i)′=Clip1_(Y)((2*p _(2i)+3*p _(2i) +p _(1i) +p _(0i) +q_(0i)+4)>>3)  (25)p _(2i)′=Clip1_(Y)((5*p _(2i) +p _(1i) +p ₀₁ +q _(0i)+4)>>3)  (26)

The arithmetic processing unit 2453 copies the pixels in the upper blockBKu on the upper end of the filter processing range in the upwarddirection and uses the same. That is, by using the image data p2 of thepixels at the upper end of the filter processing range stored in thedata storage unit 2451 as the image data p3, the image data p2 i′ afterthe filtering process is calculated by the operation of Expression (25).

The arithmetic processing unit 2456 reduces the number of taps andcalculates the image data p2 i′ after the filtering process by theoperation of Expression (26) using the coefficients changes with thereduction in the number of taps. In this case, the coefficients arechanged such that the coefficient of the image data p2 is changed from“3” to “5” so as to correspond to copying of the upper end pixels in thetap range.

When the boundary BB is not the inter-LCU line boundary, since it is notnecessary to use the image data of the line memory 241, the samefiltering operation as the conventional operation is performed withoutnarrowing the image range used for the filtering operation. That is, thearithmetic processing unit 2453 illustrated in FIG. 11 performs the samefiltering operation as the conventional operation. Moreover, thearithmetic processing unit 2455 illustrated in FIG. 12 performs the samefiltering operation as the conventional operation and the data selectingunit 2457 selects and outputs the image data from the arithmeticprocessing unit 2455.

In this manner, when the boundary is a line boundary of blocks in whichthe process is sequentially performed in a raster scan order, bycontrolling the image range used for the filtering operation, even whenthe memory capacity of the line memory is reduced, the deblockingfiltering process can be performed in the same manner as before thereduction. Moreover, for example, one line of image of 4K×2K correspondsto two lines of image of 2K×1K. Further, in the H.264/AVC scheme, a linememory corresponding to four lines is included, and the memory capacitycorresponding to one line of image of 4K×2K corresponds to 50% of thememory capacity of the H.264/AVC scheme. Thus, the effect of reducingthe memory capacity in a high-resolution image is improved.

8. Second Embodiment of Deblocking Filtering Unit

A second embodiment of the deblocking filtering unit is different fromthe first embodiment in that the operations of the arithmetic processingunit 2453 and the arithmetic processing unit 2456 are different fromthose of the first embodiment.

In strong filtering, when the boundary BB is the inter-LCU lineboundary, and the operations of Expressions (12) to (18) described aboveare performed, as illustrated in FIG. 13(A), the image data of the blockBKu on the upper side of the boundary BB corresponding to four linesfrom the boundary BB needs to be stored in the line memory.

Here, the filter operation unit 245 controls the image range used forthe filtering operation in the block positioned on the upper side of theboundary BB whereby the vertical filtering process can be performed evenwhen the memory capacity of the line memory is reduced. For example, asillustrated in FIG. 13(B), image data corresponding to three lines fromthe boundary BB is stored, and the vertical filtering process isperformed using the stored image data. That is, the arithmeticprocessing unit 2453 illustrated in FIG. 11 performs the operation ofExpression (27). Moreover, the arithmetic processing unit 2456illustrated in FIG. 12 performs the operation of Expression (28), andthe data selecting unit 2457 selects the image data from the arithmeticprocessing unit 2456 and outputs the image data. In Expressions (27) and(28), “i” indicates a column index of pixel, and when the filteringprocess is performed in units of blocks of 8×8 pixels, “i=0 to 7.”[Mathematical formula 8]p _(2i)′=Clip1_(Y)((2*p _(1i)+3*p _(2i) +p _(1i) +p _(0i) +q_(0i)+4)>>3)  (27)p _(2i)′=Clip1_(Y)((3*p _(2i)+3*p _(1i) +p _(0i) +q _(0i)+4)>>3)  (28)

The arithmetic processing unit 2453 performs mirror copying about thepixels in the upper block BKu on the upper end of the filter processingrange. That is, by storing the image data p1 in the data storage unit2451, mirror-copying the image data p1 about the upper end pixels in thefilter processing range to use the image data p1 as the image data p3,the image data p2 i′ after the filtering process is calculated by theoperation of Expression (27).

The arithmetic processing unit 2456 reduces the number of taps andcalculates the image data p2 i′ after the filtering process by theoperation of Expression (28) using the coefficients changes with thereduction in the number of taps. In this case, the coefficients arechanged such that the coefficient of the image data p1 is changed from“2” to “3” so as to correspond to mirror-copying about the upper endpixels in the filter processing range.

When the boundary BB is not the inter-LCU line boundary, since it is notnecessary to use the image data of the line memory 241, the samefiltering operation as the conventional operation is performed withoutnarrowing the image range used for the filtering operation. That is, thearithmetic processing unit 2453 illustrated in FIG. 11 performs the samefiltering operation as the conventional operation. Moreover, thearithmetic processing unit 2455 illustrated in FIG. 12 performs the samefiltering operation as the conventional operation and the data selectingunit 2457 selects and outputs the image data from the arithmeticprocessing unit 2455.

In this manner, when the boundary is a line boundary of blocks in whichthe process is sequentially performed in a raster scan order, bycontrolling the image range used for the filtering operation, similarlyto the first embodiment, even when the memory capacity is reduced, thedeblocking filtering process can be performed.

9. Third Embodiment of Deblocking Filtering Unit

A third embodiment of the deblocking filtering unit is different fromthe first and second embodiments in that the operations of thearithmetic processing unit 2453 and the arithmetic processing unit 2456are different from those of the first embodiment.

FIGS. 14(A) and 14(B) are diagrams for describing the operation of thefilter operation unit 245. The drawings illustrate the image data ofrespective pixels of two adjacent blocks BKu and BKl. Here, thefiltering operation is performed using three pixels each from a boundary(line boundary) BB as a filter processing range of the verticalfiltering process and four pixels each from the boundary BB as a tap.When it is determined that the filtering is to be performed in a strongfiltering mode, the operations of Expressions (12) to (18) describedabove are performed for each column by the arithmetic processing units2453 and 2455. Moreover, when it is determined that the filtering is tobe performed in a weak filtering mode, the operations of Expressions (7)to (10) described above are performed for each column by the arithmeticprocessing units 2453 and 2455.

When the deblocking filtering process is performed in a raster order inrespective LCU units, it is determined that the vertical filteringprocess is performed in a strong filtering mode, and the operations ofExpressions (12) to (18) described above are performed. Thus, asillustrated in FIG. 14(A), the image data of the block BKu on the upperside of the boundary BB corresponding to four lines from the boundary BBneeds to be stored in the line memory.

Here, the filter operation unit 245 controls the filter processing rangeand the image range used for the filtering operation in the blockpositioned on the upper side of the boundary BB whereby the verticalfiltering process can be performed even when the memory capacity of theline memory is reduced. For example, as illustrated in FIG. 14(B), thefilter processing range in the upper block BKu is set to a range of twopixels from the boundary BB, and the image data corresponding to twolines from the boundary BB is stored. Further, the vertical filteringprocess is performed using the stored image data similarly to the firstembodiment. That is, the arithmetic processing unit 2453 illustrated inFIG. 11 performs the operations of Expressions (29) and (30). Moreover,the arithmetic processing unit 2456 illustrated in FIG. 12 performs theoperations of Expressions (31) and (32), and the data selecting unit2457 selects the image data from the arithmetic processing unit 2456 andoutputs the image data. In Expressions (29) to (32), “i” indicates acolumn index of pixel, and when the filtering process is performed inunits of blocks of 8×8 pixels, “i=0 to 7.”[Mathematical formula 9]p _(1i)′=Clip1_(Y)((p _(1i) +p _(0i) +q _(0i)+2)>>3)  (29)p _(0i)′=Clip1_(Y)((p _(1i)+2*p _(1i)+2*p _(0i)+2*q _(0i) +q_(1i)+4)>>3)  (30)p _(1i)′=Clip1_(Y)((2*p _(1i) +p _(0i) +q _(0i)+2)>>2)  (31)p _(0i)′=Clip1_(Y)((3*p _(1i)+2*p _(0i)+2*q _(0i) +q _(1i)+4)>>3)  (32)

The arithmetic processing unit 2453 copies the pixels in the upper blockBKu on the upper end of the filter processing range in the upwarddirection and uses the same. That is, by using the image data p1 of thepixels at the upper end of the filter processing range stored in thedata storage unit 2451 as the image data p2, the image data p1 i′ and p0i′ after the filtering process is calculated by the operations ofExpressions (29) and (30).

The arithmetic processing unit 2456 reduces the number of taps andcalculates the image data p1 i′ and p0 i′ after the filtering process bythe operations of Expressions (31) and (32) using the coefficientschanges with the reduction in the number of taps. In this case, thecoefficients are changed such that the coefficient of the image data p1in Expression (31) is changed from “1” to “2” and the image data p1 inExpression (32) is changed from “2” to “3” so as to correspond tocopying of the upper end pixels in the tap range.

When the boundary BB is not the inter-LCU line boundary, since it is notnecessary to use the image data of the line memory 241, the samefiltering operation as the conventional operation is performed withoutnarrowing the image range used for the filtering operation. That is, thearithmetic processing unit 2453 illustrated in FIG. 11 performs the samefiltering operation as the conventional operation. Moreover, thearithmetic processing unit 2455 illustrated in FIG. 12 performs the samefiltering operation as the conventional operation and the data selectingunit 2457 selects and outputs the image data from the arithmeticprocessing unit 2455.

In this manner, when the boundary is a line boundary of blocks in whichthe process is sequentially performed in a raster scan order, bycontrolling the filter processing range and the image range used for thefiltering operation, even when the memory capacity is reduced, thedeblocking filtering process can be performed in the same manner asbefore the reduction. Moreover, it is possible to reduce the memorycapacity much more.

10. Fourth Embodiment of Deblocking Filtering Unit

A fourth embodiment of the deblocking filtering unit is different fromthe first embodiment in that the operations of the arithmetic processingunit 2453 and the arithmetic processing unit 2456 are different fromthose of the third embodiment.

In strong filtering, when the boundary BB is the inter-LCU lineboundary, and the operations of Expressions (12) to (18) described aboveare performed, as illustrated in FIG. 14(A), the image data of the blockBKu on the upper side of the boundary BB corresponding to four linesfrom the boundary BB needs to be stored in the line memory.

Here, the filter operation unit 245 controls the filter processing rangeand the image range used for the filtering operation in the blockpositioned on the upper side of the boundary BB whereby the verticalfiltering process can be performed even when the memory capacity of theline memory is reduced. For example, as illustrated in FIG. 14(B), thefilter processing range in the upper block BKu is set to a range of twopixels from the boundary BB, and the image data corresponding to twolines from the boundary BB is stored. Further, the vertical filteringprocess is performed using the stored image data similarly to the secondembodiment. That is, the arithmetic processing unit 2453 illustrated inFIG. 11 performs the operations of Expressions (33) and (34). Moreover,the arithmetic processing unit 2456 illustrated in FIG. 12 performs theoperations of Expressions (35) and (36), and the data selecting unit2457 selects the image data from the arithmetic processing unit 2456 andoutputs the image data. In Expressions (33) to (36), “i” indicates acolumn index of pixel, and when the filtering process is performed inunits of blocks of 8×8 pixels, “i=0 to 7.”[Mathematical formula 10]p _(1i)′=Clip1_(Y)((p _(0i) +p _(1i) +p _(0i) +q _(0i)+2)>>2)  (33)p _(0i)′=Clip1_(Y)((p _(0i)+2*p _(1i)+2*p _(0i)+2*q _(0i) +q_(1i)+4)>>3)  (34)p _(1i)′=Clip1_(Y)((p _(1i)+2*p _(0i) +q _(0i)+2)>>2)  (35)p _(0i)′=Clip1_(Y)((2*p _(1i)+3*p _(0i) +q _(0i) +q _(1i)+4)>>3)  (36)

The arithmetic processing unit 2453 performs mirror copying about thepixels in the upper block BKu on the upper end of the filter processingrange. That is, by storing the image data p0 in the data storage unit2451, mirror-copying the image data p0 about the upper end pixels in thefilter processing range to use the image data p0 as the image data p2,the image data p1 i′ and p0 i′ after the filtering process is calculatedby the operations of Expressions (33) and (34).

The arithmetic processing unit 2456 reduces the number of taps andcalculates the image data p1 i′ and p0 i′ after the filtering process bythe operations of Expressions (35) and (36) using the coefficientschanges with the reduction in the number of taps. In this case, thecoefficients are changed such that the coefficient of the image data p0in Expression (35) is changed from “1” to “2” and the image data p0 inExpression (36) is changed from “2” to “3” so as to correspond tomirror-copying about the upper end pixels in the filter processingrange.

When the boundary BB is not the inter-LCU line boundary, since it is notnecessary to use the image data of the line memory 241, the samefiltering operation as the conventional operation is performed withoutnarrowing the image range used for the filtering operation. That is, thearithmetic processing unit 2453 illustrated in FIG. 11 performs the samefiltering operation as the conventional operation. Moreover, thearithmetic processing unit 2455 illustrated in FIG. 12 performs the samefiltering operation as the conventional operation and the data selectingunit 2457 selects and outputs the image data from the arithmeticprocessing unit 2455.

In this manner, when the boundary is a line boundary of blocks in whichthe process is sequentially performed in a raster scan order, bycontrolling the filter processing range and the image range used for thefiltering operation, even when the memory capacity is reduced, thedeblocking filtering process can be performed in the same manner asbefore the reduction. Moreover, it is possible to reduce the memorycapacity much more.

11. Fifth Embodiment of Deblocking Filtering Unit

The deblocking filtering unit described above controls the image rangeused for the filtering operation in a block positioned on the upper sideof a boundary and controls the filter processing range depending onwhether the boundary BB is an inter-LCU line boundary. Next, in a fifthembodiment, a case where a mode where the image range is controlled whenthe boundary BB is the inter-LCU line boundary and a mode where theimage range is controlled regardless of whether the boundary BB is theinter-LCU line boundary are provided will be described.

FIG. 15 is a flowchart illustrating the operation of the fifthembodiment. In step ST81, the deblocking filtering unit 24 detects aline boundary. The deblocking filtering unit 24 detects a line boundaryin which the vertical filtering process is performed.

In step ST82, the deblocking filtering unit 24 determines a filterstrength. The deblocking filtering unit 24 determines whether a strongfiltering mode or a weak filtering mode will be used for the lineboundary in which the vertical filtering process is performed.

In step ST83, the deblocking filtering unit 24 determines whether arange-reduced vertical filtering process is to be performed with respectto the inter-LCU line boundary only (that is, whether a verticalfiltering process is to be performed by reducing the image range usedfor the filtering operation). When it is determined that therange-reduced vertical filtering process is to be performed with respectto the line boundary of blocks smaller than the size of LCU as well asthe inter-LCU line boundary, the deblocking filtering unit 24 proceedsto step ST84. Moreover, when it is determined that the range-reducedvertical filtering process is to be performed with respect to theinter-LCU line boundary only, the deblocking filtering unit 24 proceedsto step ST85.

The deblocking filtering unit 24 determines whether the range-reducedvertical filtering process is to be performed with respect to theinter-LCU line boundary only based on the quantization parameters set inunits of frames, for example. When the quantization parameter is small,better image quality is obtained as compared to when the quantizationparameter is large. Thus, when the quantization parameter is larger thana predetermined threshold value, the deblocking filtering unit 24determines that the vertical filtering process is to be performed in amode where image quality is improved by performing the range-reducedvertical filtering process with respect to the inter-LCU line boundaryonly and performing a normal vertical filtering process with respect toa line boundary of blocks smaller than the size of LCU, and proceeds tostep ST84. Moreover, when the quantization parameter is equal to orsmaller than the predetermined threshold value, the deblocking filteringunit 24 determines that the vertical filtering process is to beperformed in a mode where control is made easy by performing therange-reduced vertical filtering process with respect to the lineboundary between blocks smaller than the size of LCU as well as theinter-LCU line boundary, and proceeds to step ST85.

In step ST84, the deblocking filtering unit 24 determines whether aboundary in which the vertical filtering process is performed is aninter-LCU line boundary. The deblocking filtering unit 24 proceeds tostep ST85 when the boundary in which the vertical filtering process isperformed is the inter-LCU line boundary and proceeds to step ST86 whenthe boundary is a line boundary of blocks smaller than the size of LCU.

In step ST85, the deblocking filtering unit 24 performs a range-reducedvertical filtering process. The deblocking filtering unit 24 performsthe vertical filtering process while reducing the image range used forthe filtering operation of the upper adjacent LCU and proceeds to stepST87. In the range-reduced vertical filtering process, the filteringrange may be reduced.

In step ST86, the deblocking filtering unit 24 performs a normalvertical filtering process. The deblocking filtering unit 24 performsthe vertical filtering process without reducing the image range used forthe filtering operation and proceeds to step ST87.

In step ST87, the deblocking filtering unit 24 determines whether thevertical filtering process at the boundary has been completed. When thevertical filtering process for the respective columns of the boundaryhas not been completed, the deblocking filtering unit 24 returns to stepST87 and performs the process for the next column. Moreover, when thevertical filtering process for the respective columns of the boundaryhas been completed, the flow proceeds to step ST88.

In step ST88, the deblocking filtering unit 24 determines whether theprocess has been completed up to the end of the screen. When the processhas not been completed up to the end of the screen, the deblockingfiltering unit 24 returns to step ST81, detects a new boundary andperforms the vertical filtering process. When the process has beencompleted up to the end of the screen, the deblocking filtering unit 24ends the process for one screen.

When such a process is performed, it is possible to reduce the memorycapacity of the line memory. When the range-reduced vertical filteringprocess is performed with respect to other line boundaries as well asthe inter-LCU line boundary, switching of filtering processes is notrequired and control is made easy. Moreover, when the range-reducedvertical filtering process is performed with respect to the inter-LCUline boundary only, better image quality can be obtained.

12. Description of Sixth to Eighth Embodiments

[Description of Conventional Technique]

In the above description, an example in which the image data of a tap inthe image range is copied or mirror-copied and used as image data of thetap that is outside the image range due to the narrowing of the imagerange used for the filtering operation has been described. Here, in thepresent specification, copying is synonymous with padding.

As in the present technique, a method of performing a filtering processusing padding in the line boundary of LCUs only has been proposed inJCTVC-F053.

Referring to FIG. 16, a filtering process of a strong filter and afiltering process using padding for luminance signals in the HEVC schemewill be described.

FIG. 16 is an explanatory diagram illustrating an example of pixels intwo blocks BKu and BKl that are adjacent vertically with a line boundaryinterposed. In the example of FIG. 16, image data of pixels in the blockBKu is represented by symbol “pj_(i).” Here, “j” is a row index of pixeland “i” is column index of pixel. Moreover, a smallest unit of theencoding process is a block of 8×8 pixels, and row indexes “j” of 0, 1,2, and 3 are assigned sequentially (from top to bottom) from the rowclose to the line boundary BB. Column indexes “i” of 0, 1, 2, . . . ,and 7 are assigned from left to right of the block. The upper half ofthe block BKu is omitted in the drawing. On the other hand, image dataof pixels in the block BKl is represented by symbol “qk_(i).” Here, “k”is a row index of pixel and “i” is a column index of pixel. The rowindexes “k” of 0, 1, 2, and 3 are assigned sequentially (from top tobottom) from the row close to the line boundary BB. The lower half ofthe block BKl is also omitted in the drawing.

In the strong filtering of the luminance signal in the HEVC scheme, theluminance components of the respective pixels in the filter processingrange are calculated by performing the operations of Expressions (37) to(42). Expressions (37) to (42) correspond to Expressions (14), (16),(13), (17), (12), and (18), respectively.[Mathematical formula 11]p0₀=Clip₀₋₂₅₅((p2_(i)+2*p1_(i)+2*p0_(i)+2*q0_(i) +q1_(i)+4)>>3);i=0,7  (37)q0₀=Clip₀₋₂₅₅((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3);i=0,7  (38)p1₀=Clip₀₋₂₅₅((p2_(i) +p1_(i) +p0_(i) +q0_(i)+2)>>3); i=0,7  (39)q1₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>2); i=0,7  (40)p2₀=Clip₀₋₂₅₅((2*p3_(i)+3*p2_(i) +p1_(i) +p0_(i) +q0_(i)+4)>>3);i=0,7  (41)q2₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3);i=0,7  (42)

Here, “Clip₀₋₂₅₅” indicates a clipping process of rounding a value up to“0” when the value is “0” or smaller and rounding a value down to “255”when the value is “255” or larger. The same is applied to the followingexpressions.

In contrast, in the conventional proposal described above, the filteringprocess is performed using padding with R2W2 reduction although thefiltering process is performed at the line boundary of LCUs only. Here,R2W2 represents that the filtering process is applied to two pixels onthe inter-LCU line boundary by referring to two pixels on the inter-LCUline boundary.

In the strong filtering of luminance signals in the conventionalproposal, the luminance components of the respective pixels in thefilter processing range are calculated by performing the operations ofExpressions (43) to (47).[Mathematical formula 12]·p0₀=Clip₀₋₂₅₅((p1_(i)+2*p1_(i)+2*p0_(i)+2*q0_(i) +q1_(i)+4)>>3);i=0,7  (43)·q0₀=Clip₀₋₂₅₅((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3);i=0,7  (44)·p1₀=Clip₀₋₂₅₅((p1_(i) +p1_(i) +p0_(i) +q0_(i)+2)>>3); i=0,7  (45)·q1₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>2); i=0,7  (46)·q2₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3);i=0,7  (47)

Here, Expression (43) of the strong filtering in the conventionalproposal is different in that “p2 _(i)” in Expression (37) of the strongfiltering of the HEVC scheme is changed to “p1 _(i).” Expression (45) ofthe strong filtering in the conventional proposal is different in that“p2 _(i)” in Expression (39) of the strong filtering of the HEVC schemeis changed to “p1 _(i).” The strong filtering in the conventionalproposal is different in that an expression corresponding to Expression(41) of the strong filtering of the HEVC scheme is deleted.

Expressions (44), (46), and (47) of the strong filtering in theconventional proposal are the same as Expressions (38), (40), and (42),respectively, of the strong filtering of the HEVC scheme.

That is, in the conventional proposal, since the pixel “p2 ₁” on thethird row from the line boundary BB of the block Bku is not referred to,the pixel “p1 _(i)” on a row immediately below the third row of the samecolumn is padded and used instead.

Moreover, the filtering process is not applied to the pixel “p2 ₀” onthe third row from the line boundary BB of the block Bku. Therefore, inthe strong filtering of the conventional proposal, an expressioncorresponding to Expression (41) of the strong filtering of the HEVCscheme is deleted.

By doing so, in the conventional proposal, the memory capacity of theline memory is suppressed from becoming larger than that of the HEVCscheme.

However, in the case of 4 k images, since it is necessary to have alarge line memory, it is requested to further reduce the line memory inthe deblocking process. Moreover, in reducing the line memory, it isrequested to maintain a better block noise reduction function of thedeblocking process than the method of the conventional proposal.

Here, in inter-block boundary determination in the HEVC scheme, asindicated by Expression (48) below, a waveform having a constantinclination on both sides of a line boundary is subjected to theprocess. Therefore, in the present technique, the deblocking process atthe inter-LCU line boundary is performed using the inclination of thewaveform used in the inter-block boundary determination, which will bedescribed in detail below.[Mathematical formula 13]|p2₂-2*p1₂ +p0₂ |+|q2₂−2*q1₂ +q0₂ |+|p2₅-2*p1₅ +p0₅ |+|q2₅−2*q1₅+q0₅|<β  (48)[Description of Present Technique (Linear Approximation)]

In the example of FIG. 17, an inter-block boundary determinationexpression used in the HEVC scheme, of Expression (48) is illustrated.

As illustrated in FIG. 17, the first term on the left side of Expression(48) is an expression for determining a pixel on the third column fromthe left side of the block Bku and can be expressed by a difference ofdifferences (second-order difference) (that is, a second-orderdifferential having a constant inclination.p2₂−2*p1₂ +p0₂=(p2₂ −p1₂)−(p1₂ −p0₂)

The second to fourth terms on the left side of Expression (48) are anexpression for determining a pixel on the sixth column from the leftside of the block Bku, an expression for determining a pixel on thethird column from the left side of the block Bkl, and an expression fordetermining a pixel on the sixth column from the left side of the blockBkl, respectively. The same can be said for the second to fourth termson the left side of Expression (48).

As above, in the inter-block boundary determination in the HEVC scheme,since the waveform having a constant inclination is subjected to theprocess, the deblocking process at the inter-LCU line boundary uses theinclination of the waveform used in the inter-block boundarydetermination.

In the conventional technique, as for pixels that could not be referredto, the deblocking process at the inter-LCU line boundary uses padding.In contrast, in the present technique, as for pixels that could not bereferred to, the deblocking process at the inter-LCU line boundaryperforms linear approximation using the inclination of the waveform.

That is, in the deblocking process at the inter-LCU line boundary in thepresent technique, Expression (49) below of linear approximation isused.[Mathematical formula 14]p2₁ =p1₁+(p2_(i) −p1_(i))≈p1_(i)+(p1_(i) −p0_(i))=2*p1_(i) −p0_(i)  (49)

As illustrated in FIG. 18, when the pixel values of p2 _(i), p1 _(i),and p0 _(i) have an inclination, the pixel value of p2 _(i) could not bereferred to in the conventional R2W2-based padding. Thus, although thepixel value of p1 _(j) immediately below the pixel p2 _(i) is padded andused instead of the pixel value of p2 ₁ as indicated by the hatchedcircle, since the actual pixel value of p2 _(i) is at the position ofthe dot circle, an error occurs.

In contrast, in the R2W2-based linear prediction of the presenttechnique, since the pixel value of p2 _(i) could not be referred to, apixel value (=the same pixel value as the actual pixel value) predictedby linear prediction from the inclination based on the pixel values ofp1 _(j) and p0 _(i) is used as the pixel value of p2 _(i) as indicatedby the hatched circle.

By doing so, when pixel values have an inclination, the presenttechnique does not incur more errors than the conventional paddingmethod. Thus, although the R2W2-based technique is used, it is possibleto reduce the line memory while maintaining the block noise reductionfunction of the deblocking process.

Moreover, for example, one line of image of 4K×2K corresponds to twolines of image of 2K×1K. Further, in the H.264/AVC scheme, a line memorycorresponding to four lines is included, and the memory capacitycorresponding to one line of image of 4K×2K corresponds to 50% of thememory capacity of the H.264/AVC scheme. Thus, the effect of reducingthe memory capacity in a high-resolution image is improved.

When the pixel values of p2 _(i), p1 _(i), and p0 _(i) do not have aninclination, substantially the same result is obtained as when the pixelvalue of p1 ₁ immediately below the pixel p2 _(i) is used. In this case,although the R2W2-based technique is used, it is possible to reduce theline memory while maintaining the block noise reduction function of thedeblocking process.

[Filtering Process for R2W2 Case]

Next, the filtering process of luminance signals for the R2W2 case willbe described. Here, R2 represents the number of pixels referred to andW2 represents the number of pixels to which the filtering process isapplied. That is, R2W2 represents that the filtering process is appliedto two pixels on the inter-LCU line boundary by referring to two pixelson the inter-LCU line boundary as illustrated in FIG. 19.

In the example of FIG. 19, it is illustrated that pixels on the thirdand fourth columns from the line boundary BB in the block BKu in FIG. 16could not be referred to.

As illustrated again for comparison, in the strong filtering of theluminance signal in the HEVC scheme, the luminance components of therespective pixels in the filter processing range are calculated byperforming the operations of Expressions (50) to (55). Expressions (50)to (55) correspond to Expressions (37) to (42), respectively.[Mathematical formula 15]p0₀=Clip₀₋₂₅₅((p2_(i)+2*p1_(i)+2*p0_(i)+2*q0_(i) +q1_(i)+4)>>3);i=0,7  (50)q0₀=Clip₀₋₂₅₅((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3);i=0,7  (51)p1₀=Clip₀₋₂₅₅((p2_(i) +p1_(i) +p0_(i) +q0_(i)+2)>>2); i=0,7  (52)q1₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>2); i=0,7  (53)p2₀=Clip₀₋₂₅₅((2*p3_(i)+3*p2_(i) +p1_(i) +p0_(i) +q0_(i)+4)>>3);i=0,7  (54)q2₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3);i=0,7  (55)

In contrast, in the strong filtering of the luminance signal in the R2W2case of the present technique, the luminance components of therespective pixels in the filter processing range are calculated byperforming the operations of Expressions (56) to (60).[Mathematical formula 16]·p0₀=Clip₀₋₂₅₅((4*p1_(i) +p0_(i)+2*q0_(i) +q1_(i)+4)>>3); i=0,7  (56)·q0₀=Clip₀₋₂₅₅((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3);i=0,7  (57)·p1₀=Clip₀₋₂₅₅((3*p1_(i) +q0_(i)+2)>>3); i=0,7  (58)q1₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>2); i=0,7  (59)q2₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3);i=0,7  (60)

Here, Expression (56) of the strong filtering of the R2W2 case isdifferent in that “p2 _(i)+2*p1 _(i)+2*p0 _(i)” in Expression (50) ofthe strong filtering of the HEVC scheme is changed to “4*p1 _(i)+p0_(i)” according to Expression (49) of linear approximation.

Expression (58) of the strong filtering of the R2W2 case is different inthat “p2 _(i)+2*p1 _(i)+p0 _(i)” in Expression (52) of the strongfiltering of the HEVC scheme is changed to “3*p1 _(i)” according toExpression (49) of linear approximation.

The strong filtering of the R2W2 case is different in that an expressioncorresponding to Expression (54) of the strong filtering of the HEVCscheme is deleted.

That is, in the R2W2 case of the present technique, since the pixel “p2_(i)” on the third row from the line boundary BB of the block Bku is notreferred to, Expression (49) of linear approximation is substituted andused instead.

Moreover, the filtering process is not applied to the pixel “p2 ₀” onthe third row from the line boundary BB of the block Bku. Therefore, inthe strong filtering of the R2W2 case, an expression corresponding toExpression (54) of the strong filtering of the HEVC scheme is deleted.

Next, a weak filtering determination expression for luminance signals ata line boundary and weak filtering will be described.

First, in the weak filtering determination expression for luminancesignals in the HEVC scheme and the weak filtering, the luminancecomponents of the respective pixels in the filter processing range arecalculated by performing the operations of Expressions (61) to (63). Thefirst terms of Expressions (61) to (63) are weak filtering determinationexpressions.[Mathematical formula 17]if(abs(delta)<iThrCut),delta=(9*(q0_(i) −p0_(i))−3*(q1_(i) −p1_(i)))p0₀=Clip₀₋₂₅₅(p0_(i)+Clip_((−tc)−tc)(delta)); i=0,7q0₀=Clip₀₋₂₅₅(q0_(i)+Clip_((−tc)−tc)(delta)); i=0,7  (61)if(abs((p2₂−2*p1₂ +p0₂)+abs(p2₅−2*p1₅ +p0₅)<iSideThreshold))p1₀=Clip₀₋₂₅₅(p1_(i)+Clip_((−tc2)−tc2)((((p2_(i)+p0_(i)+1)>>1)−p1_(i)+(delta)>>1); i=0,7  (62)if(abs((q2₂−2*q1₂ +q0₂)+abs(q2₅−2*q1₅ +q0₅)<iSideThreshold))q1₀=Clip₀₋₂₅₅(q1_(i)+Clip_((−tc2)−tc2)((((q2_(i)+q0_(i)+1)>>1)−q1_(i)+(delta)>>1); i=0,7  (63)

Here, as described above, “Clip₀₋₂₅₅” indicates a clipping process ofrounding a value up to “0” when the value is “0” or smaller and roundinga value down to “255” when the value is “255” or larger. Moreover,Clip)_((−tc)−tc) indicates a clipping process of rounding a value up to“−tc” when the value is “−tc” or smaller and rounding a value down to“tc” when the value is “tc” or larger. The “tc2” clipping is the same.The same is applied to the following expressions. Here, “tc” is a valueset based on the parameter Q as indicated in Table 1.

In contrast, in the weak filtering determination expression forluminance signals in the R2W2 case and the weak filtering, the luminancecomponents of the respective pixels in the filter processing range arecalculated by performing the operations of Expressions (64) to (66). Thefirst terms of Expressions (64) to (66) are weak filtering determinationexpressions.[Mathematical formula 18]if(abs(delta)<iThrCut),delta=(9*(q0_(i) −p0_(i))−3*(q1_(i) −p1_(i)))p0₀=Clip₀₋₂₅₅(p0_(i)+Clip_((−tc)−tc)(delta)); i=0,7q0₀=Clip₀₋₂₅₅(q0_(i)+Clip_((−tc)−tc)(delta)); i=0,7  (64)if(abs(0−(p1₂ −p0₂))+abs(0−(p1₅ −p0₅)<iSideThreshold))p1₀=Clip₀₋₂₅₅(p1_(i)+Clip_((−tc2)−tc2)((((p1_(i)+p1_(i)+1)>>1)−p1_(i)+(delta)>>1); i=0,7  (65)if(abs((q2₂−2*q1₂ +q0₂)+abs(q2₅−2*q1₅ +q0₅)<iSideThreshold))q1₀=Clip₀₋₂₅₅(q1_(i)+Clip_((−tc2)−tc2)((((q2_(i)+q0_(i)+1)>>1)−q1_(i)−(delta)>>1); i=0,7  (66)

Here, an expression within the tc2 clipping of the second term which isa weak filtering expression within Expression (65) of the R2W2 case isdifferent from an expression within the tc2 clipping of the second termin Expression (62) of the HEVC scheme according to Expression (49) oflinear approximation. That is, the expression “((((p2 _(i)+p0_(i)+1)>>1)−p1 _(i)+delta)>>1)” within the tc2 clipping of the secondterm of the HEVC scheme is changed to the expression “((((p1 _(i)+p1_(i)+1)>>1)−p1 _(i)+delta)>>1)” within the tc2 clipping of the secondterm.

Moreover, an expression within the if clause of the first term which isa weak filtering determination expression within Expression (65) of theR2W2 case is different from an expression within the if clause of thefirst term in Expression (62) of the HEVC scheme. That is, theexpression “abs (p2 ₂− 2*p1 ₂+p0 ₂)+abs (p2 ₅−2*p1 ₅+p0 ₅)” within theif clause of the first term of the HEVC scheme is changed to theexpression “abs(0−(p1 ₂−p0 ₂))+abs(0− (p1 ₅−p0 ₅))” within the if clauseof the first term.

That is, in the first term of Expression (65), a pixel immediately belowa current pixel is padded as indicated in Expression (67) below ratherthan linearly approximating the same. In other words, “0” in theexpression “abs (0−(p1 ₂−p0 ₂))” represents “0=p2 ₂−p1 ₂” and “0” in theexpression “abs (0−(p1 ₅−p0 ₅))” represents “0=p2 ₅−p1 ₅.”[Mathematical formula 19]p2_(i) ≈p1_(i)  (67)

This is because as for inclination determination in the filteringdetermination expression, the use of linear approximation allows toignore determination which actually cannot be ignored. Thus, in theinclination determination of the weak filtering determinationexpression, a pixel immediately below a current pixel is padded asindicated in Expression (67). The same can be said for the strongfiltering determination expression and the inter-block boundarydetermination expression described below.

Next, an inter-block boundary determination expression and a strongfiltering determination expression for luminance signals at a lineboundary will be described.

First, an inter-block boundary determination expression for luminancesignals in the HEVC scheme is expressed by Expression (68) below and astrong filtering determination expression is expressed by Expression(69) below.[Mathematical formula 20]if(abs((p2₂−2*p1₂ +p0₂)+abs(p2₅−2*p1₅ +p0₅)+abs((q2₂−2*q1₂+q0₂)+abs((q2₅−2*q1₅ +q0₅)+<β)  (68)[Mathematical formula 21]d<(β>>2),d=abs(p2₂−2*p1₂ +p0₂)+abs(p2₅−2*p1₅ +p0₅)+abs((q2₂−2*q1₂+q0₂)+abs(q2₅−2*q1₅ +q0₅)and (|p3_(i) −p0_(i) |+|q0_(i) −q3_(i)|)<(β>>3and |p0_(i) −q0_(i)|<((5*t _(c)+1)>>1  (69)

In contrast, an inter-block boundary determination expression in theR2W2 case of the present technique is expressed by Expression (70) belowand a strong filtering determination expression is expressed byExpression (71) below.[Mathematical formula 22]if(abs(0−(p1₂ −p0₂))+abs(0−(p1₅ −p0₅))+abs((q2₂−2*q1₂+q0₂)+abs((q2₅−2*q1₅ +q0₅)+<β)  (70)[Mathematical formula 23]d<(β>>2),d=abs(0−(p1₂ −p0₂))+abs(0−(p1₅ −p0₅)+abs((q2₂−2*q1₂+q0₂)+abs(q2₅−2*q1₅ +q0₅) and (|p1_(i) −p0_(i))<<1|+|q0_(i)−q3_(i)|)<(β>>3) and |p0_(i) −q0_(i)|<((5*t _(c)+1)>>1  (71)

The first and second terms in the if clause of Expression (70) forinter-block boundary determination of the R2W2 case are different fromthe first and second terms in the if clause of Expression (68) forinter-block boundary determination of the HEVC scheme according toExpression (67) for padding. That is, the first and second terms “abs(p2₂−2*p1 ₂+p0 ₂)+abs (p2 ₅−2*p1 ₅+p0 ₅)” in the if clause of the HEVCscheme are changed to the first and second terms “abs(0−(p1 ₂−p0₂))+abs(0−(p1 ₅−p0 ₅))” in the if clause.

Moreover, an expression in the absolute value on the first row ofExpression (71) for strong filtering determination of the R2W2 case isdifferent from an expression in the absolute value on the first row ofExpression (69) for strong filtering determination in the HEVC schemeaccording to Expression (67) for padding. That is, the expression “abs(p2 ₂−2*p1 ₂+p0 ₂)+abs (p2 ₅− 2*p1 ₅+p0 ₅)” in the absolute value on thefirst row of Expression (69) is changed to the expression “abs(0−(p1₂−p0 ₂))+abs(0− (p1 ₅−p0 ₅))” in the absolute value on the first row ofExpression (71).

Further, an expression appearing after the first “and” of Expression(71) for the strong filtering determination of the R2W2 case isdifferent from an expression appearing after the first “and” ofExpression (69) for the strong filtering determination in the HEVCscheme. That is, the expression “(|p3 _(i)−p0 _(i)<<1|+|q0 _(i)− q3_(i)|)<(β>>3))” appearing after the first “and” of Expression (69) ischanged to the expression “(|p1 _(i)−p0 _(i)<<1|+|q0 _(i)−q3_(i)|)<(β>>3))” appearing after the first “and” of Expression (71).

Since the determination of this part is determination of the magnitudesof pixel values, Expression (49) for linear approximation and Expression(67) for padding are used. That is, the expression appearing after thefirst “and” of Expression (71) is generated in such a manner that “p3_(i)” in the expression appearing after the first “and” of Expression(69) is first approximated as “p2 ₁” by padding and “p2 _(i)” isapproximated as “2*p1 _(i)−p0 _(i)” by linear approximation.

[Filtering Process for R2W1 Case]

Next, the filtering process of luminance signals for the R2W1 case willbe described. Here, R2 represents the number of pixels referred to andW1 represents the number of pixels to which the filtering process isapplied. That is, R2W1 represents that the filtering process is appliedto one pixel on the inter-LCU line boundary by referring to two pixelson the inter-LCU line boundary as illustrated in FIG. 19.

In the strong filtering of the luminance signal in the R2W1 case of thepresent technique, the luminance components of the respective pixels inthe filter processing range are calculated by performing the operationsof Expressions (72) to (75).[Mathematical formula 24]p0₀=Clip₀₋₂₅₅((4*p1_(i) +p0_(i)+2*q0_(i) +q0_(i) +q1_(i)+4)>>3);i=0,7  (72)q0₀=Clip₀₋₂₅₅((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3);i=0,7  (73)q1₀=Clip₀₋₂₅₅((p0_(i) +q1_(i) +q2_(i)+2)>>2); i=0,7  (74)q2₀=Clip₀₋₂₅₅((p0_(i) +q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3);i=0,7  (75)

Here, Expression (72) of the strong filtering of the R2W1 case isdifferent in that “p2 _(j)+2*p1 _(j)+2*p0 _(j)” in Expression (50) ofthe strong filtering of the HEVC scheme is changed to “4*p1 _(i)+p0_(i)” according to Expression (49) of linear approximation.

The strong filtering of the R2W1 case is different in that expressionscorresponding to Expressions (52) and (54) of the strong filtering ofthe HEVC scheme are deleted.

That is, in the present technique, since the pixel “p2 _(i)” on thethird row from the line boundary BB of the block Bku is not referred to,Expression (49) of linear approximation is substituted and used instead.

Moreover, the filtering process is not applied to the pixels “p1 _(o)”and “p2 ₀” on the second and third rows from the line boundary BB of theblock Bku. Therefore, in the strong filtering of the R2W1 case,expressions corresponding to Expressions (52) and (54) of the strongfiltering of the HEVC scheme is deleted.

Next, a weak filtering determination expression for luminance signals ata line boundary and weak filtering will be described.

In the weak filtering determination expression for luminance signals inthe R2W1 case and the weak filtering, the luminance components of therespective pixels in the filter processing range are calculated byperforming the operations of Expressions (76) and (77).[Mathematical formula 25]if(abs(delta)<iThrCut),delta=(9*(q0_(i) −p0_(i))−3*(q1_(i) −p1_(i)))p0₀=Clip₀₋₂₅₅(p0_(i)+Clip_((−tc)−tc)(delta)); i=0,7q0₀=Clip₀₋₂₅₅(q0_(i)−Clip_((−tc)−tc)(delta)); i=0,7  (76)if(abs((q2₂−2*q1₂ +q0₂)+abs(q2₅−2*q1₅ +q0₅)<iSideThreshold))q1₀=Clip₀₋₂₅₅(q1_(i)+Clip_((−tc2)−tc2)((((q2_(i)+q0_(i)+1)>>1)−q1_(i)−delta)>>1); i=0,7  (77)

Here, in the R2W1 case, the filtering process is not applied to thepixel “p1 _(o)” on the second row from the line boundary BB of the blockBku. Therefore, in the weak filtering determination expression for theR2W1 case and the weak filtering, an expression corresponding toExpression (62) of the HEVC scheme is deleted.

Next, an inter-block boundary determination expression and a strongfiltering determination expression for luminance signals at a lineboundary will be described.

An inter-block boundary determination expression in the R2W1 case isexpressed by Expression (78) below and a strong filtering determinationexpression is expressed by Expression (79) below.[Mathematical formula 26]if(abs(0−(p1₂ −p0₂))+abs(0−(p1₅ −p0₅))+abs((q2₂−2*q1₂+q0₂)+abs((q2₅−2*q1₅ +q0₅)+<β)  (78)[Mathematical formula 27]d<(β>>2),d=abs(0−(p1₂ −p0₂))+abs(0−(p1₅ −p0₅)+abs((q2₂−2*q1₂+q0₂)+abs(q2₅−2*q1₅ +q0₅) and (|p1_(i) −p0_(i))<<1|+|q0_(i)−q3_(i)|)<(β>>3) and |p0_(i) −q0_(i)|<((5*t _(c)+1)>>1  (79)

The first and second terms in the if clause of Expression (78) forinter-block boundary determination of the R2W1 case are different fromthe first and second terms in the if clause of Expression (68) forinter-block boundary determination of the HEVC scheme according toExpression (67) for padding. That is, the first and second terms “abs(p2₂−2*p1 ₂+p0 ₂)+abs (p2 ₅−2*p1 ₅+p0 ₅)” in the if clause of the HEVCscheme are changed to the first and second terms “abs(0−(p1 ₂−p0₂))+abs(0−(p1 ₅−p0 ₅))” in the if clause.

Moreover, an expression in the absolute value on the first row ofExpression (79) for strong filtering determination of the R2W1 case isdifferent from an expression in the absolute value on the first row ofExpression (69) for strong filtering determination in the HEVC schemeaccording to Expression (67) for padding. That is, the expression “abs(p2 ₂−2*p1 ₂+p0 ₂)+abs (p2 ₅− 2*p1 ₅+p0 ₅)” in the absolute value on thefirst row of Expression (69) is changed to the expression “abs(0−(p1₂−p0 ₂))+abs(0−(p1 ₅−p0 ₅))” in the absolute value on the first row ofExpression (79).

Further, an expression appearing after the first “and” of Expression(79) for the strong filtering determination of the R2W1 case isdifferent from an expression appearing after the first “and” ofExpression (69) for the strong filtering determination in the HEVCscheme. That is, the expression “(|p3 _(i)−p0 _(i)<<1|+|q0 _(i)− q3_(i)|)<((β>>3))” appearing after the first “and” of Expression (69) ischanged to the expression “(|p1 _(i)−p0 _(i)<<1|+|q0 _(i)−q3_(i)|)<(β>>3))” appearing after the first “and” of Expression (79).

As described above in connection with the R2W2 case, since thedetermination of this part is determination of the magnitudes of pixelvalues, Expression (49) for linear approximation and Expression (67) forpadding are used. That is, the expression appearing after the first“and” of Expression (79) is generated in such a manner that “p3 _(i)” inthe expression appearing after the first “and” of Expression (69) isfirst approximated as “p2 _(i)” and “p2 _(i)” is approximated as “2*p1_(i)−p0 _(i).”

A configuration example and an operation for realizing the abovedetermination process based on linear approximation will be describedwith reference to FIGS. 22 to 24 as sixth and seventh embodiments of thedeblocking filtering unit.

As described above, in the present technique, the inter-block boundarydetermination at the line boundary and the strong filteringdetermination expression are changed using Expression (49) for linearapproximation and Expression (67) for padding. Thus, a clipping processis added to a strong filtering process as a countermeasure to a casewhere the determination expression is erroneously ignored and thedeblocking filtering process is erroneously performed.

[Description of Present Technique (Clipping Process in StrongFiltering)]

Next, a clipping process in strong filtering which is an eighthembodiment will be described. The strong filtering for luminance signalsin the R2W2 case may also use Expressions (80) to (84) in which aclipping process is added.[Mathematical formula 28]p0₀=Clip₀₋₂₅₅(p0₀+Clip_((−tc)−tc)(((4p1_(i) +p0_(i)+2*q0_(i)+q1_(i)+4)>>3)−p0₀)); i=0,7  (80)q0₀=Clip₀₋₂₅₅(p0₀+Clip_((−tc)−tc)(((p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i)+q2_(i)+4)>>3)−p0₀)); i=0,7  (81)p1₀=Clip₀₋₂₅₅(p1₀+Clip_((−tc)−tc)(((3p1_(i) +q0_(i)+2)>>2)−p1₀));i=0,7  (82)q1₀=Clip₀₋₂₅₅(q1₀+Clip_((−tc)−tc)(((p0_(i) +q0_(i) +q1_(i)+q2_(i)+2)>>2)−q1₀)); i=0,7  (83)q2₀=Clip₀₋₂₅₅(q2₀+Clip_((−tc)−tc)(((p1_(i) +q0_(i)+q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3)−q2₀)); i=0,7  (84)

Expression (80) for strong filtering is a calculation expression for p0₀ after filtering. In Expression (80) for strong filtering, a clippingprocess of (−tc) to tc is applied to a difference between the expressionin the clipping process of 0 to 255 in Expression (56) and p0 ₀ toobtain a value, the value is added to p0 ₀ to obtain another value, andthe other value is subjected to a clipping process of 0 to 255.

Expression (81) for strong filtering is a calculation expression for q0₀ after filtering. In Expression (81) for strong filtering, a clippingprocess of (−tc) to tc is applied to a difference between the expressionin the clipping process of 0 to 255 in Expression (57) and q0 ₀ toobtain a value, the value is added to q0 ₀ to obtain another value, andthe other value is subjected to a clipping process of 0 to 255.

Expression (82) for strong filtering is a calculation expression for p1₀ after filtering. In Expression (82) for strong filtering, a clippingprocess of (−tc) to tc is applied to a difference between the expressionin the clipping process of 0 to 255 in Expression (58) and p1 ₀ toobtain a value, the value is added to p1 ₀ to obtain another value, andthe other value is subjected to a clipping process of 0 to 255.

Expression (83) for strong filtering is a calculation expression for q1₀ after filtering. In Expression (83) for strong filtering, a clippingprocess of (−tc) to tc is applied to a difference between the expressionin the clipping process of 0 to 255 in Expression (59) and q1 ₀ toobtain a value, the value is added to q1 ₀ to obtain another value, andthe other value is subjected to a clipping process of 0 to 255.

Expression (84) for strong filtering is a calculation expression for q2₀ after filtering. In Expression (84) for strong filtering, a clippingprocess of (−tc) to tc is applied to a difference between the expressionin the clipping process of 0 to 255 in Expression (60) and q2 ₀ toobtain a value, the value is added to q2 ₀ to obtain another value, andthe other value is subjected to a clipping process of 0 to 255.

By doing so, it is possible to suppress excessive application of thefiltering process.

Here, Matthias Narroschke, Tomas Wedi, Semih Esenlik, “Results formodified decisions for deblocking,” JCTVC-G590, Joint Collaborative Teamon Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG117th Meeting, Geneva, CH, 21-30 Nov. 2011 (hereinafter referred to asNon-Patent Document 2) is proposed.

In Non-Patent Document 2, it is described that a strong/weak filteringdetermination process is performed in respective block units. However,in the determination process described in Non-Patent Document 2, whendetermination results on a current line and a block unit to which theline belongs are different (for example, when weak filtering isdetermined for the current line whereas strong filtering is determinedfor a block that includes the line, article information is applied tothe current line), an excessive filtering process is applied.

Moreover, in the Non-Patent Document 2, since the strong/weak filteringdetermination process is performed in units of four lines, a mismatchoccurs between the determination and the filtering process. As anexample of the mismatch, weak filtering is determined although it isnecessary to determine strong filtering and strong filtering isdetermined although it is necessary to determine weak filtering.

In strong filtering of luminance signals in the HEVC scheme (HM-5.0),Expressions (85) to (89) below are employed.[Mathematical formula 29]p0_(i)=(p2_(i)+2*p1_(i)+2*p0_(i)+2*q0_(i) +q1_(i)+4)>>3); i=0,7  (85)q0_(i)=(p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3); i=0,7  (86)p1_(i)=(3*p1_(i) +q0_(i)+2)>>2); i=0,7  (87)q1_(i)=(p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>3); i=0,7  (88)q2_(i)=(p0_(i) +*q0_(i) +q1_(i)+3*q2_(i)+2*q3_(i)+4)>>3); i=0,7  (89)

In the present technique, in order to eliminate a mismatch of thedetermination process and an incompleteness in the determinationprocess, the clipping process indicated in Expressions (90) to (94)below. In Expression (90), since a clipping process is to be performedon a partial Δ-value that changes with the filtering process, p0 _(i) isoutside the clipping process. The same is applied to Expressions (91) to(94).[Mathematical formula 30]p0_(i) =p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3); i=0,7  (90)q0_(i) =q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p0_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3); i=0,7  (91)p1_(i) =p1_(i)+Clip_((−pv)−(pv))((−p1_(i) +q0_(i)2)>>2); i=0,7  (92)q1_(i) =q1_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)−3*q1_(i)+q2_(i)+2)>>2); i=0,7  (93)q2_(i) =q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+q1_(i)−5*q2_(i)+2*q3_(i)+4)>>3); i=0,7  (94)

Here, a clipping value “pv” is any one of 1 time, 2 times, 3 times, 4times, 5 times, 6 times, 7 times, and 8 times of the parameter tc. Thatis, pv=tc, 2*tc, 3*tc, 4*tc, 5*tc, 6*tc, 7*tc, 8*tc. Although theclipping value “pv” is preferably 2 times of the parameter tc, theclipping value may be any one of 1 time to 8 times of the parameter.Moreover, the clipping value is not limited to 1 time to 8 times as longas the same effects are obtained.

Moreover, “tc” changes with the quantization parameter QP. Thus, themultiplication factor of the clipping value applied to “tc” may also beincreased (that is, be changed with QP) as QP increases. The parameter(the clipping value or the value of a multiplication factor of theclipping value applied to “tc”) applied to the clipping process may beset in advance and may be added to an encoded stream and transmissionterminator to a decoding side.

Expressions (90) to (94) described above may be modified so that theclipping process is performed as in Expressions (95) to (99) below.[Mathematical formula 31]p0_(i)=Clip₀₋₂₅₅(p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3)); i=0,7  (95)q0_(i)=Clip₀₋₂₅₅(q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p1_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3)); i=0,7  (96)p1_(i)=Clip₀₋₂₅₅(p1_(i)+Clip_((−pv)−(pv))((−p1_(i) +q0_(i)+2)>>2));i=0,7  (97)q1_(i)=Clip₀₋₂₅₅(q1_(i)+Clip_((−pv)−(pv))((p0_(i)+q0_(i)−3*q2_(i)+2)>>2)); i=0,7  (98)q2_(i)=Clip₀₋₂₅₅(q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+q1_(i)−5*q2_(i)+2*q3_(i)+4)>>3)); i=0,7   (99)

Here, Expressions (85) to (89) for the strong filtering of luminancesignals of the HEVC scheme (HM-5.0) are expressions for strong filteringof luminance signals at a line boundary. That is, in the HEVC scheme(HM-5.0), the strong filtering of luminance signals is actuallyexpressed by Expressions (100) to (105) below.[Mathematical formula 32]p0_(i)=(p2_(i)+2*p1_(i)+2*p0_(i)+2*q0_(i) +q1_(i)+4)>>3; i=0,7  (100)q0_(i)=(p1_(i)+2*p0_(i)+2*q0_(i)+2*q1_(i) +q2_(i)+4)>>3; i=0,7  (101)p1_(i)=(p2_(i) +p1_(i) +p0_(i) +q0_(i)+2)>>2; i=0,7  (102)q1_(i)=(p0_(i) +q0_(i) +q1_(i) +q2_(i)+2)>>2; i=0,7  (103)p2_(i)=(2*p3_(i)+3*p2_(i) +p1_(i) +p0_(i) +q0_(i)+4)>>3; i=0,7  (104)q2_(i)=(p0_(i) +q0_(i) +p1_(i)+3*q2_(i)+2*q3_(i)+4)>>3; i=0,7  (105)

In the present technique, in order to eliminate a mismatch of thedetermination process and an incompleteness of the determinationprocess, a clipping process may be applied to the strong filtering forluminance signals as indicated in Expressions (106) to (111) so as tocorrespond to Expressions (100) to (105). In the first expression ofExpression (106), similarly to Expressions (90) to (94) described above,since a clipping process is to be performed on the partial Δ-value thatchanges with the filtering process, “p0 _(i)” is outside the clippingprocess. The same is applied to the first expressions of Expressions(107) to (111).

$\begin{matrix}\left\lbrack {{Mathematical}\mspace{14mu}{formula}\mspace{14mu} 33} \right\rbrack & \; & \; \\\begin{matrix}{{p\; 0_{i}} = {{p\; 0_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{p\; 2_{i}} + {2^{*}p\; 1_{i}} - {6^{*}p\; 0_{i}} +} \right. \right.}}} \\{\left. {\left. {{2^{*}q\; 0_{i}} + {q\; 1_{i}} + 4} \right) ⪢ 3} \right);} \\{= {{Clip}_{{({{p\; 0_{i}} - {pv}})} - {({{p\; 0_{i}} + {pv}})}}\left( \left( {{p\; 2_{i}} + {2^{*}p\; 1_{i}} + {2^{*}p\; 0_{i}} +} \right. \right.}} \\{\left. {\left. {{2^{*}q\; 0_{i}} + {q\; 1_{i}} + 4} \right) ⪢ 3} \right);}\end{matrix} & {{i = 0},7} & (106) \\\begin{matrix}{{q\; 0_{i}} = {{q\; 0_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{p\; 1_{i}} + {2^{*}p\; 0_{i}} - {6^{*}q\; 0_{i}} +} \right. \right.}}} \\{\left. {\left. {{2^{*}q\; 1_{i}} + {q\; 2_{i}} + 4} \right) ⪢ 3} \right);} \\{= {{Clip}_{{({{q\; 0_{i}} - {pv}})} - {({{q\; 0_{i}} + {pv}})}}\left( \left( {{p\; 1_{i}} + {2^{*}p\; 0_{i}} + {2^{*}q\; 0_{i}} +} \right. \right.}} \\{\left. {\left. {{2^{*}q\; 1_{i}} + {q\; 2_{i}} + 4} \right) ⪢ 3} \right);}\end{matrix} & {{i = 0},7} & (107) \\\begin{matrix}{{p\; 1_{i}} = {{p\; 1_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{p\; 2_{i}} - {3^{*}p\; 1_{i}} + {p\; 0_{i}} +} \right. \right.}}} \\{\left. {\left. {{q\; 0_{i}} + 2} \right) ⪢ 2} \right);} \\{= {{Clip}_{{({{p\; 1_{i}} - {pv}})} - {({{p\; 1_{i}} + {pv}})}}\left( \left( {{p\; 2_{i}} + {p\; 1_{i}} + {p\; 0_{i}} +}\; \right. \right.}} \\{\left. {\left. {{q\; 0_{i}} + 2} \right) ⪢ 2} \right);}\end{matrix} & {{i = 0},7} & (108) \\\begin{matrix}{{q\; 1_{i}} = {{q\; 1_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{p\; 0_{i}} + {q\; 0_{i}} - {3^{*}q\; 1_{i}} +} \right. \right.}}} \\{\left. {\left. {{q\; 2_{i}} + 2} \right) ⪢ 2} \right);} \\{= {{Clip}_{{({{q\; 1_{i}} - {pv}})} - {({{q\; 1_{i}} + {pv}})}}\left( \left( {{p\; 0_{i}} + {q\; 0_{i}} + {q\; 1_{i}} +} \right. \right.}} \\{\left. {\left. {{q\; 2_{i}} + 2} \right) ⪢ 2} \right);}\end{matrix} & {{i = 0},7} & (109) \\\begin{matrix}{{p\; 2_{i}} = {{p\; 2_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{2^{*}p\; 2_{i}} - {5^{*}p\; 2_{i}} + {p\; 1_{i}} +} \right. \right.}}} \\{\left. {\left. {{p\; 0_{i}} + {q\; 0_{i}} + 4} \right) ⪢ 3} \right);} \\{= {{Clip}_{{({{p\; 2_{i}} - {pv}})} - {({{p\; 2_{i}} + {pv}})}}\left( \left( {{2^{*}p\; 3_{i}} + {3^{*}p\; 2_{i}} + {p\; 1_{i}} +}\; \right. \right.}} \\{\left. {\left. {{p\; 0_{i}} + {q\; 0_{i}} + 4} \right) ⪢ 3} \right);}\end{matrix} & {{i = 0},7} & (110) \\\begin{matrix}{{q\; 2_{i}} = {{q\; 2_{i}} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( \left( {{p\; 0_{i}} + {q\; 0_{i}} + {q\; 1_{i}} -} \right. \right.}}} \\{\left. {\left. {{5^{*}q\; 2_{i}} + {2^{*}q\; 3_{i}} + 4} \right) ⪢ 3} \right);} \\{= {{Clip}_{{({{q\; 2_{i}} - {pv}})} - {({{q\; 2_{i}} + {pv}})}}\left( \left( {{p\; 0_{i}} + {q\; 0_{i}} + {q\; 1_{i}} +} \right. \right.}} \\{\left. {\left. {{3^{*}q\; 2_{i}} + {2^{*}q\; 3_{i}} + 4} \right) ⪢ 3} \right);}\end{matrix} & {{i = 0},7} & (111)\end{matrix}$

Here, a clipping value “pv” is any one of 1 time, 2 times, 3 times, 4times, 5 times, 6 times, 7 times, and 8 times of the parameter tc. Thatis, pv=tc, 2*tc, 3*tc, 4*tc, 5*tc, 6*tc, 7*tc, 8*tc. Although theclipping value “pv” is preferably 2 times of the parameter tc, theclipping value may be any one of 1 time to 8 times of the parameter.Moreover, the clipping value is not limited to 1 time to 8 times as longas the same effects are obtained.

Moreover, “tc” changes with the quantization parameter QP. Thus, themultiplication factor of the clipping value applied to “tc” may also beincreased (that is, be changed with QP) as QP increases. The parameter(the clipping value or the value of a multiplication factor of theclipping value applied to “tc”) applied to the clipping process may beset in advance and may be added to an encoded stream and transmissionterminator to a decoding side.

FIG. 20 is a diagram illustrating the largest values of the pixel valuesthat change with the strong filtering of luminance signals in the HEVCscheme (HM-5.0) of Expressions (100) to (105) described above, obtainedthrough an experiment.

AI_HE, RA_HE, LB_HE, and LP_HE indicate conditions of this experiment.AI_HE indicates that the experiment was performed in ALL INTRA HighEfficiency mode. RA_HE indicates that the experiment was performed inRandom Access High Efficiency mode. LB_HE indicates that the experimentwas performed in Low Delay B High Efficiency mode. LP_HE indicates thatthe experiment was performed in Low Delay P High Efficiency mode.

“22, 27, 32, and 37” appearing under AI_HE, RA_HE, LB_HE, and LP_HE arevalues of the quantization parameters used in the experiment. Moreover,Class A to Class F indicate the type of test sequence used in theexperiment.

As illustrated in FIG. 20, a pixel value that changes with the strongfiltering of luminance signals in the HEVC scheme (HM-5.0) (that is, apixel value that changes with the strong filtering when the clippingprocess is not present) changes greatly by 100 or more in some cases.

Therefore, a clipping process is applied to the strong filtering ofluminance signals. Due to this, as illustrated in FIG. 21, it ispossible to suppress the influence of a mismatch of the determinationprocess and an incompleteness of the determination process as much aspossible.

In the example of FIG. 21, when there is an edge (that is not a blockboundary) indicated by a solid line, although a deblocking process isnot to be performed, if the deblocking process is performed according tothe technique of Non-Patent Document 2, the pixel values are changedgreatly as indicated by dot lines.

For example, as indicated by solid line, before the deblocking processis performed, the values of the pixels p2 _(i), p1 _(i), and p0 _(i) are255, the values of the pixels q0 _(i), q1 ₁, and q2 ₁ are 0, and thedifference D between the values of the pixels p0 _(i) and q0 _(i) is255.

In contrast, as indicated by dot line, after the deblocking process isperformed, the value of the pixel p2 ₁ is 223, the value of the pixel p1_(i) is 191, and the value of the pixel p0 _(i) is 159. Thus, the pixelvalues of the pixels p2 _(i), p1 _(i), and p0 _(i) are changed greatly.Moreover, after the deblocking process is performed, the value of thepixel q0 ₁ is 96, the value of the pixel q1 ₁ is 64, and the value ofthe pixel q2 _(i) is 32. Thus, the pixel values of the pixels q0 _(i),q1 _(i), and q2 _(i) are changed greatly.

In such a case, in the strong filtering of Expressions (106) to (111)described above, a clipping process of which the clipping value is 10 isperformed.

In contrast, as indicated by bold line, after the deblocking process isperformed, the values of the pixels p2 _(i), p1 _(i), and p0 _(i) are245, and the values of the pixels q0 _(i), q1 _(i), and q2 _(i) are 255.Thus, the change in the pixel values can be suppressed as much aspossible.

A configuration example and an operation of the clipping process in thestrong filtering will be described with reference to FIGS. 25 to 27described later as an eighth embodiment of the deblocking filteringunit.

13. Sixth Embodiment of Deblocking Filtering Unit

[Configuration Example of Deblocking Filtering Unit]

FIG. 22 illustrates the configuration of the sixth embodiment of thedeblocking filtering unit. The deblocking filtering unit 24 isconfigured to include an image memory 71, a block boundary determiningunit 72-1, a filter strength determining unit 73-1, a filter operationunit 74-1, a selector 75, a coefficient memory 76, and a filtercontroller 77. The deblocking filtering unit 24 is configured to furtherinclude a line boundary/block boundary determining unit 72-2, a lineboundary filter strength determining unit 73-2, and a line boundaryfilter operation unit 74-2.

The image memory 71 is a unit that corresponds to the line memory 241 ofFIG. 9 and is configured as a line memory. The image memory 71 storesimage data supplied from the adder 23. The image memory 71 reads theimage data stored therein and supplies the read image data to the blockboundary determining unit 72-1, the filter strength determining unit73-1, and the filter operation unit 74-1. Moreover, the image memory 71reads the image data stored therein and supplies the read image data tothe line boundary/block boundary determining unit 72-2, the lineboundary filter strength determining unit 73-2, and the line boundaryfilter operation unit 74-2.

At positions other than the line boundary, the image data is not storedin the image memory 71, but there may be case where the image datasupplied from the adder 23 is supplied to the respective units andprocessed. However, in the example of FIG. 22, for the sake ofconvenience, it is described that the image data having passed throughthe image memory 71 is processed.

The block boundary determining unit 72-1 performs inter-block boundarydetermination under the control of the controller 77. That is, the blockboundary determining unit 72-1 performs the inter-block boundarydetermination process for each block using the image data read from theimage memory 71 and detects an inter-block boundary in which thefiltering process is performed. The block boundary determining unit 72-1outputs the detection results to the filter strength determining unit73-1.

The filter strength determining unit 73-1 determines the filter strengthin the above-described manner under the control of the controller 77.That is, the filter strength determining unit 73-1 determines whetherthe filtering process will be performed in a strong filtering mode or aweak filtering mode for each line using the image data of two blockswith an inter-block boundary interposed, supplied from the image memory71 and outputs the determination results to the filter operation unit74-1.

The filter operation unit 74-1 performs a filtering operation with thefilter strength determined by the filter strength determining unit 73-1for each line under the control of the controller 77 using the imagedata stored in the image memory 71 and the filter coefficients read fromthe coefficient memory 76. The filter operation unit 74-1 outputs theimage data having been subjected to the filtering process to theselector 75.

When the boundary is an inter-LCU line boundary, the line boundary/blockboundary determining unit 72-2 performs inter-block boundarydetermination under the control of the controller 77. That is, the lineboundary/block boundary determining unit 72-2 performs the inter-blockboundary determination process for each block using the image data readfrom the image memory 71 and detects an inter-block boundary in whichthe filtering process is performed. The line boundary/block boundarydetermining unit 72-2 outputs the detection results to the line boundaryfilter strength determining unit 73-2.

When the boundary is an inter-LCU line boundary, the line boundaryfilter strength determining unit 73-2 determines the filter strength inthe above-described manner under the control of the controller 77. Thatis, the line boundary filter strength determining unit 73-2 determineswhether the filtering process will be performed in a strong filteringmode or a weak filtering mode for each line using the image data of twoblocks adjacent with an inter-block boundary interposed, supplied fromthe image memory 71 and outputs the determination results to the lineboundary filter operation unit 74-2.

The line boundary filter operation unit 74-2 performs the filteringoperation with the filter strength determined by the line boundaryfilter strength determining unit 73-2 for each line under the control ofthe controller 77 using the image data stored in the image memory 71 andthe filter coefficients read from the coefficient memory 76. The lineboundary filter operation unit 74-2 outputs the image data having beensubjected to the filtering process to the selector 75.

The selector 75 selects any one of the image data from the filteroperation unit 74-1 and the image data from the line boundary filteroperation unit 74-2 under the control of the controller 77 and outputsthe selected image data to the frame memory 25.

The coefficient memory 76 stores filter coefficients used for thefiltering operation of the deblocking filtering process. The coefficientmemory 76 reads the filter coefficients stored therein and supplies theread filter coefficients to the filter operation unit 74-1 and the lineboundary filter operation unit 74-2.

The controller 77 controls the respective units of the deblockingfiltering unit 24. For example, the controller 77 controls the imagememory 71 so as to store image data corresponding to a predeterminednumber of lines on the lower side in the block and reads the image datastored in the image memory 71. The controller 77 is configured toinclude an intra-LCU line determining unit 77A.

The intra-LCU line determining unit 77A determines whether a boundary isan inter-LCU line boundary in respective block units in which theprocess is sequentially performed in a raster scan direction, andsupplies the determination results to the block boundary determiningunit 72-1, the filter strength determining unit 73-1, and the filteroperation unit 74-1 so that the units perform the process when theboundary is not the line boundary. Moreover, the intra-LCU linedetermining unit 77A also supplies the determination results to the lineboundary/block boundary determining unit 72-2, the line boundary filterstrength determining unit 73-2, and the line boundary filter operationunit 74-2 so that the units perform the process when the boundary is theline boundary. Further, the intra-LCU line determining unit 77A suppliesthe determination results to the selector 75 so that the selector 75selects the image data from the line boundary filter operation unit 74-2when the boundary is the line boundary and selects the image data fromthe filter operation unit 74-1 when the boundary is not the lineboundary.

The deblocking filtering unit 24 illustrated in FIG. 22 may beconfigured in advance to perform the R2W2 process, for example, and maybe configured so as to be able to control the filter processing rangeand the filtering operation range similarly to the example of FIG. 9.

[Operation of Deblocking Filtering Unit]

Next, the deblocking process of the deblocking filtering unit 24 of FIG.22 will be described with reference to the flowchart of FIG. 23. In theexample of FIG. 23, a case where the R2W2 process is performed will bedescribed.

In step S91, the intra-LCU line determining unit 77A determines whethera filter applied is a vertical filter of a LCU boundary in respectiveblock units in which the process is sequentially performed in a rasterscan direction. That is, in step S91, it is determined whether aboundary is an inter-LCU line boundary and the filter applied is avertical filter.

When it is determined in step S91 that the filter applied is a verticalfilter of a LCU boundary, the flow proceeds to step S92. In step S92,the line boundary/block boundary determining unit 72-2 performsinter-block boundary determination of a line boundary under the controlof the controller 77 when the boundary is an inter-LCU line boundary.

That is, the line boundary/block boundary determining unit 72-2 performsthe inter-block boundary determination process for each block accordingto Expression (70) described above using the image data read from theimage memory 71 and detects an inter-block boundary in which thefiltering process is performed. The line boundary/block boundarydetermining unit 72-2 outputs the detection results to the line boundaryfilter strength determining unit 73-2.

In step S93, the line boundary filter strength determining unit 73-2determines the filter strength of the line boundary as described aboveunder the control of the controller 77 when the boundary is theinter-LCU line boundary.

That is, the line boundary filter strength determining unit 73-2determines whether the filtering process will be performed in a strongfiltering mode or a weak filtering mode using the image data of twoblocks adjacent with the inter-block boundary, supplied from the imagememory 71. A strong filtering mode is determined according to Expression(71) described above. Moreover, a weak filtering mode is determinedaccording to the first terms of Expressions (64) to (66) describedabove. The line boundary filter strength determining unit 73-2 outputsthe determination results to the line boundary filter operation unit74-2.

In step S94, the line boundary filter operation unit 74-2 performs afiltering process of the line boundary under the control of thecontroller 77. That is, the line boundary filter operation unit 74-2performs a filtering operation with the filter strength determined bythe line boundary filter strength determining unit 73-2 using the imagedata stored in the image memory 71 and the filter coefficient read fromthe coefficient memory 76.

In the case of the strong filtering, the filtering operation isperformed according to Expressions (56) to (60) described above.Moreover, in the case of the weak filtering, the filtering operation isperformed according to the second and third terms of Expressions (64) to(66) described above. The line boundary filter operation unit 74-2outputs the image data having been subjected to the filtering process tothe selector 75.

In step S95, the intra-LCU line determining unit 77A determines whethera current line is the last eighth line of the LCU. When it is determinedin step S95 that the current line is not the last eighth line of theLCU, the flow returns to step S93 and the subsequent processes arerepeated.

Moreover, when it is determined in step S95 that the current line is thelast eighth line of the LCU, the flow proceeds to step S100.

On the other hand, when it is determined in step S91 that the filterapplied is not the vertical filter of the LCU boundary, the flowproceeds to step S96. In step S96, the block boundary determining unit72-1 performs inter-block boundary determination under the control ofthe controller 77.

That is, the block boundary determining unit 72-1 performs theinter-block boundary determination process for each block according toExpression (68) described above using the image data read from the imagememory 71 and detects an inter-block boundary in which the filteringprocess is performed. The block boundary determining unit 72-1 outputsthe detection results to the filter strength determining unit 73-1.

In step S97, the filter strength determining unit 73-1 determines thefilter strength in the above-described manner under the control of thecontroller 77. That is, the filter strength determining unit 73-1determines whether the filtering process will be performs in a strongfiltering mode or a weak filtering mode for each line using the imagedata of two blocks adjacent with the inter-block boundary interposed,supplied from the image memory 71. A strong filtering mode is determinedaccording to Expression (69) described above. A weak filtering mode isdetermined according to the first terms of Expressions (61) to (63)described above. The filter strength determining unit 73-1 outputs thedetermination results to the filter operation unit 74-1.

In step S98, the filter operation unit 74-1 performs a filteringoperation of the block boundary under the control of the controller 77.That is, the filter operation unit 74-1 performs the filtering operationwith the filter strength determined by the filter strength determiningunit 73-1 for each line using the image data stored in the image memory71 and the filter coefficients read from the coefficient memory 76.

In the case of the strong filtering, the filtering operation isperformed according to Expressions (50) to (55) described above.Moreover, in the case of the weak filtering, the filtering operation isperformed according to the second and third terms of Expressions (61) to(63) described above. The filter operation unit 74-1 outputs the imagedata having been subjected to the filtering process to the selector 75.

In step S99, the intra-LCU line determining unit 77A determines whethera current line is the last eighth line of the LCU. When it is determinedin step S99 that the current line is not the last eighth line of theLCU, the flow returns to step S97 and the subsequent processes arerepeatedly performed.

Moreover, when it is determined in step S99 that the current line is thelast eighth line of the LCU, the flow proceeds to step S100.

In step S100, the intra-LCU line determining unit 77A determines whethera current block is the last block of the image. That is, in step S100,it is determined whether the boundary is a line boundary of anotherblock in the screen.

When it is determined in step S100 that the block is the last block ofthe image, the deblocking process ends. When it is determined in stepS100 that the block is not the last block of the image, the flow returnsto step S91, and the subsequent processes are repeatedly performed onthe next LCU in the raster scan order.

In the example of FIG. 22, the intra-LCU line determining unit 77Aselects whether the coefficients used for the case other than the lineboundary in the filter operation unit 74-1 or the coefficients for thecase of the line boundary in the line boundary filter operation unit74-2 will be used. In this manner, the filtering process at the lineboundary and the filtering process at the positions other than the lineboundary are switched.

In contrast, only one type of coefficients may be used and the addressof the pixel to be read may be controlled so that the filtering processat the line boundary and the filtering process at the positions otherthan the line boundary are switched.

For example, calculation of P0 ₀ in the R2W2-based strong filtering willbe described as an example. In Expression (50) for the strong filteringof the HEVC scheme,

a term relating to “p(block BKu)” is “p2 _(i)+2*P1 _(i)+2*q0 _(i).”

On the other hand, in Expression (56) for the strong filtering of theHEVC scheme,

a term relating to “p(block BKu)” is “4*P1 _(i)+q0 _(i).”

Here, 4*P1 _(i)+q0 _(i)=q0 _(i)+2*P1 _(i)+2*P1 _(i).

That is, the term relating to “p” in Expression (50) and the termrelating to “p” in Expression (56) also use coefficients 1, 2, and 2 inthat order from the left side. Thus, by replacing (changing the read-outaddresses of) the pixel values to be multiplied with the coefficientsusing the same coefficients, it is possible to switch between thefiltering process at the line boundary and the filtering process at thepositions other than the line boundary.

14. Seventh Embodiment of Deblocking Filtering Unit

[Configuration Example of Deblocking Filtering Unit]

FIG. 24 illustrates the configuration of a seventh embodiment of thedeblocking filtering unit.

In the example of FIG. 24, the deblocking filtering unit 24 isconfigured to include an image memory 71, a block boundary determiningunit 72, a filter strength determining unit 73, a filter operation unit74, a coefficient memory 76, and a controller 77.

In the deblocking filtering unit 24 of FIG. 24, the image memory 71, thecoefficient memory 76, and the controller 77 are the same as those ofthe deblocking filtering unit 24 of FIG. 22.

The deblocking filtering unit 24 of FIG. 24 is different from thedeblocking filtering unit 24 of FIG. 22 in that the block boundarydetermining unit 72-1 and the line boundary/block boundary determiningunit 72-2 are collectively changed to the block boundary determiningunit 72. The deblocking filtering unit 24 of FIG. 24 is different fromthe deblocking filtering unit 24 of FIG. 22 in that the filter strengthdetermining unit 73-1 and the line boundary filter strength determiningunit 73-2 are collectively changed to the filter strength determiningunit 73. The deblocking filtering unit 24 of FIG. 24 is different fromthe deblocking filtering unit 24 of FIG. 22 in that the filter operationunit 74-1 and the line boundary filter operation unit 74-2 arecollectively changed to the filter operation unit 74.

Further, the deblocking filtering unit 24 of FIG. 24 is different fromthe deblocking filtering unit 24 of FIG. 22 in that the intra-LCU linedetermining unit 77A of the controller 77 is changed to an intra-LCUline determining unit 77B.

That is, the intra-LCU line determining unit 77B controls the address ofthe pixel read from the image memory 71 as described above by way of anexample of calculation of P0 ₀ in the R2W2-based strong filtering. Thus,the image memory 71 reads pixels based on the control of the intra-LCUline determining unit 77B and supplies the read pixels to the blockboundary determining unit 72, the filter strength determining unit 73,and the filter operation unit 74.

The block boundary determining unit 72 performs inter-block boundarydetermination. That is, the block boundary determining unit 72 performsthe inter-block boundary determination process described above for eachblock using the image data read from the image memory 71 and detects aninter-block boundary in which the filtering process is performed. Theblock boundary determining unit 72 outputs the detection results to thefilter strength determining unit 73.

The filter strength determining unit 73 determines the filter strengthin the above-described manner. That is, the filter strength determiningunit 73 determines whether the filtering process will be performs in astrong filtering mode or a weak filtering mode for each line using theimage data of two blocks adjacent with the inter-block boundaryinterposed, supplied from the image memory 71 and outputs thedetermination results to the filter operation unit 74.

The filter operation unit 74 performs the filtering operation with thefilter strength determined by the filter strength determining unit 73for each line using the image data stored in the image memory 71 and thefilter coefficients read from the coefficient memory 76. The filteroperation unit 74 outputs the image data having been subjected to thefiltering process to the frame memory 25.

The deblocking filtering process of the deblocking filtering unit 24 ofFIG. 24 is basically the same as the deblocking filtering processdescribed above with reference to FIG. 23, and the description thereofwill not be provided.

As above, pixels which could not be referred to due to the narrowedimage range used for the filtering operation are interpolated using theinclination of the waveform used in the inter-block boundarydetermination. As a result, the deblocking process when the pixel valueshave an inclination can be performed even when the image range in theinter-LCU line boundary is narrowed.

Moreover, in inter-block boundary determination and strong/weakfiltering determination, the pixels which could not be referred to dueto the narrowed image range used for the filtering operation areinterpolated using the inclination and padding of the waveform used inthe inter-block boundary determination. As a result, the deblockingdetermination process when the pixel values have an inclination can beperformed even when the image range in the inter-LCU line boundary isnarrowed.

In this manner, in the inter-LCU line boundary, even when the imagerange is narrowed, it is possible to reduce the line memory whilemaintaining the function of the deblocking process.

15. Eighth Embodiment of Deblocking Filtering Unit

[Configuration Example of Deblocking Filtering Unit]

FIG. 25 illustrates the configuration of an eighth embodiment of thedeblocking filtering unit.

In the example of FIG. 25, the deblocking filtering unit 24 isconfigured to include an image memory 81, a block boundary determiningunit 82, a filter strength determining unit 83, a filter operation unit84, a coefficient memory 85, and a controller 86.

The image memory 81 is a unit that corresponds to the image memory 71 ofFIG. 22 and is configured as a line memory. The image memory 81 storesimage data supplied from the adder 23. The image memory 81 reads theimage data stored therein and supplies the read image data to the blockboundary determining unit 82, the filter strength determining unit 83,and the filter operation unit 84.

At positions other than the line boundary, the image data is not storedin the image memory 81, but there may be case where the image datasupplied from the adder 23 is supplied to the respective units andprocessed. However, in the example of FIG. 25, for the sake ofconvenience, it is described that the image data having passed throughthe image memory 81 is processed.

The block boundary determining unit 82 derives boundaries every eightlines under the control of the controller 86 to calculate parametersused for determination and performs inter-block boundary determinationevery four lines. That is, the block boundary determining unit 82derives a boundary between TU and PU using the image data read from theimage memory 81 and derives a BS value. Further, the block boundarydetermining unit 82 obtains an average of the quantization parameters QPof two regions adjacent with a current boundary interposed to calculatean average QP (quantization parameter) and calculates the parameters tcand β based on the calculated average QP.

Moreover, the block boundary determining unit 82 determines whether ornot to perform filtering every four lines using the image data of twoblocks adjacent with the inter-block boundary interposed, supplied fromthe image memory 81 and the calculated parameters. The block boundarydetermining unit 82 supplies the calculated parameters to the filterstrength determining unit 83 together with the boundary determinationresults.

The filter strength determining unit 83 determines the filter strengthevery four lines under the control of the controller 86. That is, whenthe block boundary determining unit 82 determines that filtering is tobe performed, the filter strength determining unit 83 determines whetherthe filtering process will be performed in a strong filtering mode or aweak filtering mode and outputs the determination results to the filteroperation unit 84.

The filter operation unit 84 performs the filtering operation with thefilter strength determined by the filter strength determining unit 83every four lines using the image data stored in the image memory 81 andthe filter coefficients read from the coefficient memory 85 under thecontrol of the controller 86. In particular, when the filter strengthdetermining unit 83 determines that strong filtering is to be performed,the filter operation unit 84 performs a clipping-based filtering processusing Expressions (106) to (111) described above. The filter operationunit 84 outputs the image data having been subjected to the filteringprocess to the frame memory 25 in the subsequent stage.

The coefficient memory 85 stores filter coefficients used in thefiltering operation of the deblocking filtering process. The coefficientmemory 85 reads the filter coefficients stored therein and supplies thefilter coefficients to the filter operation unit 84.

The controller 86 receives information (ON/OFF information of deblockingfilter, offset values of parameters β and tc, and clipping parameters)from an operation unit (not illustrated) (in the case of the decodingside, the lossless decoder 52). Moreover, the controller 86 is alsosupplied with prediction mode information and parameters necessary fordeblocking filter such as quantization parameters.

For example, the controller 86 supplies the input information to thecorresponding unit and controls the respective units of the deblockingfiltering unit 24 based on the input ON/OFF information.

The controller 86 controls the image memory 81 so as to store image datacorresponding to a predetermined number of lines on the lower side inthe block and reads the image data stored in the image memory 81.Moreover, when strong filtering is performed, the controller 86 controlsthe filter operation unit 84 to perform a clipping-based strongfiltering process. In this case, the controller 86 supplies parameters(for example, a clipping value pv and a multiplication value of tc ofthe clipping value) relating to the clipping process to the filteroperation unit 84.

[Operation of Deblocking Filtering Unit]

Next, the deblocking process of the deblocking filtering unit 24 of FIG.25 will be described with reference to the flowchart of FIG. 26.

For example, ON/OFF information, a β offset value, a Tc offset value,and parameters relating to the clipping process are input to thecontroller 86 via an operation unit (not illustrated) (in the case ofthe decoding side, the lossless decoder 52). Moreover, the controller 86is also supplied with prediction mode information and parameters suchnecessary for the deblocking filter such as quantization parameters.

In step S201, the controller 86 sets filter offsets (β and Tc offsets)and supplies the set offset information to the filter strengthdetermining unit 83.

In step S202, the controller 86 determines whether the deblocking filtercan be used based on the ON/OFF information. When it is determined instep S202 that the deblocking filter cannot be used, the deblockingfiltering process ends.

When it is determined in step S202 that the deblocking filter can beused, the controller 86 sends a notification thereof to the blockboundary determining unit 82, the filter strength determining unit 83,and the filter operation unit 84, and the flow proceeds to step S203. Inthis case, the necessary parameters and the like are also supplied fromthe controller 86 to the respective units.

In step S203, the block boundary determining unit 82 derives a boundarybetween TU and PU every 8 lines. In step S204, the block boundarydetermining unit 82 derives a boundary strength (BS) value based on theinformation on the boundary between TU and PU derived in step S203 andthe prediction mode information and the like supplied from thecontroller 86.

In step S205, the block boundary determining unit 82, the filterstrength determining unit 83, and the filter operation unit 84 perform aluminance boundary filtering process. In the luminance boundaryfiltering process, the luminance boundary filtering is performed on theluminance signals by the process of step S205, which will be describedwith reference to FIG. 27.

In step S206, the block boundary determining unit 82, the filterstrength determining unit 83, and the filter operation unit 84 perform achrominance boundary filtering process. By the process of step S206,chrominance boundary filtering is performed on chrominance signals.

In step S207, the controller 86 determines whether all boundaries havebeen processed. When it is determined in step S207 that all boundarieshave not been processed, the flow returns to step S205 and thesubsequent processes are repeatedly performed. When it is determined instep S207 that all boundaries have been processed, the flow proceeds tostep S208.

In step S208, the controller 86 determines whether all CUs have beenprocessed. When it is determined in step S208 that all CUs have not beenprocessed, the flow returns to step S203 and the subsequent processesare repeatedly performed.

When it is determined in step S208 that all CUs have been processed, thedeblocking filtering process ends.

[Example of Luminance Boundary Filtering Process]

Next, the luminance boundary filtering process in step S205 of FIG. 26will be described with reference to the flowchart of FIG. 27.

In step S231, the block boundary determining unit 82 determines whetherthe BS value is larger than 0 every eight lines. When it is determinedin step S231 that the BS value is not larger than 0, the luminanceboundary filtering process ends. That is, in this case, the filteringprocess of the filter operation unit 84 is not performed on theluminance boundary, and the pixel values before the filtering are outputas they are.

When it is determined in step S231 that the BS value is larger than 0,the flow proceeds to step S232. In step S232, the block boundarydetermining unit 82 obtains an average of quantization parameters QP oftwo regions adjacent to a current boundary using the pixel values fromthe image memory 81 every eight lines to calculate an average QP(quantization parameter). In this case, the quantization parameters QPare supplied from the controller 86.

In step S233, the block boundary determining unit 82 calculates theparameters tc and β based on the average QP calculated in step S232every eight lines.

In step S234, the block boundary determining unit 82 performs filteron/off determination every four lines. That is, the block boundarydetermining unit 82 performs filter on/off determination every fourlines using the calculated parameters β and the like. This determinationprocess uses Expression (68) described above, for example.

The on/off determination results in step S234 are supplied to the filterstrength determining unit 83 together with the calculated parameters asthe boundary determination results.

Moreover, in step S235, the filter strength determining unit 83 performsfilter strength determination every four lines. That is, the filterstrength determining unit 83 performs filter strength determinationevery four lines using the parameters β, tc, and the like calculated bythe block boundary determining unit 82. This determination process usesthe first terms of Expressions (69) and (61) to (63) described above,for example.

The on/off determination results in step S234 and the filter strengthdetermination results in step S235 are supplied to the filter operationunit 84. In this case, the parameter tc is also supplied to the filteroperation unit 84.

In step S236, the filter operation unit 84 determines whether strongfiltering is to be applied to the current four lines based on thedetermination results from the filter strength determining unit 83. Whenit is determined in step S236 that strong filtering is to be applied tothe current four lines, the flow proceeds to step S237.

In step S237, the filter operation unit 84 performs a clipping-basedstrong filtering process using Expressions (106) to (111) describedabove under the control of the controller 86. The filter operation unit84 outputs the pixel values after the filtering process to thesubsequent stage.

When it is determined in step S236 that strong filtering is not to beapplied, the filter operation unit 84 determines in step S238 whetherweak filtering is to be applied to the current four lines based on thedetermination results from the filter strength determining unit 83. Whenit is determined in step S238 that weak filtering is to be applied, theflow proceeds to step 239.

In step S239, the filter operation unit 84 performs a weak filteringprocess. The filter operation unit 84 outputs the pixel values after thefiltering process to the subsequent stage.

When it is determined in step S238 that weak filtering is not to beapplied, the flow proceeds to step 240. In step S240, the filteroperation unit 84 does not perform the process on the current four linesbased on the determination results from the filter strength determiningunit 83 but outputs the pixel values after the filtering process to thesubsequent stage as they are.

In step S240, the filter operation unit 84 determines whether theprocess for eight lines has been completed, and ends the luminancesignal deblocking process when it is determined that the process foreight lines has been completed. When it is determined in step S240 thatthe process for eight lines has not been completed, the flow returns tostep S234 and the subsequent processes are repeatedly performed.

As above, since the clipping-based strong filtering process is performedwhen it is determined that strong filtering is to be applied, it ispossible to suppress the influence of a mismatch of the determinationprocess and an incompleteness of the determination process as much aspossible. In this way, it is possible to allow the deblocking process toapply filtering appropriately.

In the above description, the linear approximation and clipping-basedstrong filtering process has been described. In the description oflinear approximation, although the cases of R2W2 and R2W1 have beendescribed, the linear approximation process for the R3W2 and R1W1 casescan be performed in the same manner.

16. Ninth Embodiment

[Example of R3W2]

Next, the R3W2 case will be described with reference to FIG. 28. In theexample of FIG. 28, white circles on solid line indicate pixel values ofthe respective pixels p2 _(i), p1 _(i), p0 _(i), q0 _(i), q1 _(i), andq2 _(i) near the boundary BB illustrated in FIG. 16 before thedeblocking filter. As illustrated in FIG. 28, a gap between the blocksBKu and BKl is D=p0 _(i)−q0 _(i).

Moreover, circles on dot line indicate the respective pixel values afterstrong filtering of luminance signals in the HEVC scheme. That is, inthis case, the difference between the pixel values before and after thestrong filtering is ⅛*D for q2 _(i), 2/8*D for q1 _(i), and ⅜*D for q0_(i). Similarly, the difference between the pixel values before andafter the strong filtering is ⅜*D for p0 _(i), 2/8*D for p1 _(i), and⅛*D for p2 _(i).

Here, considering the luminance signal filtering process for the R3W2case, the pixel p2 _(i) is not subjected to filtering. That is, thepixel p2 _(i) has a pixel value indicated by a dot circle on the solidline, and a difference to the pixel value p1 _(i) indicated by the dotline increases. Thus, the pixel values have an abrupt slope only betweenthe pixel values of p2 _(i) indicated by the dot circle on the solidline and p1 _(i) indicated by the dot line.

Thus, in the R3W2 case, in order to make this slope gentle, a differenceΔp1 _(i) between the pixel value (white circle) of p0 _(i) beforefiltering and the pixel value (hatched circle) after strong filtering isexpressed by Expression (112) below.

[Mathematical formula 34]

$\begin{matrix}\begin{matrix}{{\Delta\; p\; 1_{i}} = {{1/16^{*}}\left( {{{- 3^{*}}D} + {2^{*}4}} \right)}} \\{= {\left( {{{- 3^{*}}\left( {{p\; 0_{i}} + {q\; 0_{i}}} \right)} + 8} \right) ⪢ 4}} \\{= {\left( {{13^{*}p\; 0_{i}} + {3^{*}q\; 0_{i}} + 8} \right) ⪢ {4 - {p\; 1_{i}}}}} \\{\approx \left( {{4^{*}p\; 2_{i}} + {5^{*}p\; 1_{i}} + {4^{*}p\; 0_{i}} + {3^{*}q\; 0_{i}} + 8} \right) ⪢ {4 - {p\; 1_{i}}}}\end{matrix} & (112)\end{matrix}$

That is, Expression (112) is derived so that Δp1 _(i) takes 3/16*D whichis a half of the difference Δp0 _(i) between the pixel value (whitecircle) of p0 _(i) before filtering and the pixel value (hatched circle)after strong filtering.

Since the second term on the right side of the last approximationequation of Expression (112) is the pixel value (white circle) beforefiltering, the first term on the right side of the last approximationequation of Expression (112) represents the pixel value after strongfiltering, of p1 _(i) indicated by the hatched circle.

That is, the coefficients multiplied to the respective pixel values inthe first term on the right side of the last approximation equation ofExpression (112) are used as the coefficients of the strong filteringfor the R3W2 case. As a result, the results of the strong filtering forthe R3W2 case can be made gentle as compared to the slope of the dotline of the conventional technique as indicated by the slope of the boldline in FIG. 28.

The determination expression for strong filtering of the R3W2 case isexpressed by Expression (113) below.[Mathematical formula 35]d<(β>>2)d=abs(q2₂−2*q1₂ +q0₂)+abs(p2₅−2*p1₅ +p0₅)+abs(q2₂−2*q1₂+q0₂)+abs(q2₅−2*q1₅ +q0₅)and (|p2_(i) −p0_(i) |+|q0_(i) −q3_(i)|)<(β>>3)and |p0_(i) −q0_(i)|<((5*t _(c)+1)>>1)  (113)

An expression appearing after the first “and” of Expression (113) fordetermining the strong filtering of the R3W2 case is different from anexpression appearing after the first “and” of Expression (69) fordetermining the strong filtering of the HEVC scheme. In the case ofR3W2, since p3 _(i) could not be referred, padding (that is, p3 _(i)=p2_(i)) is not applied.

Thus, the two expressions are different only in that the expression “(p3_(i)−p0 _(i)<<1|+|q0 _(i)−q3 _(i)|)<(β>>3))” appearing after the first“and” of Expression (69) is changed to the expression “(|p2 _(i)−p0_(i)<<1|+|q0 _(i)−q3 _(i)|)<(β>>3))” appearing after the first “and” ofExpression (113).

Moreover, in the strong filtering of the R3W2 case, an expressionrelating to p1 ₀ is different from that of Expression (52) for thestrong filtering of the HEVC scheme according to Expression (112)described above as illustrated in Expression (114).[Mathematical formula 36]p1₀=Clip₀₋₂₅₅((4*p2_(i)+5*p1_(i)+4*p0_(i)+3*q0_(i)+8)>>4); i=0,7  (114)

In the strong filtering of the R3W2 case, Expression (54) relating to P2₀ of the strong filtering of the HEVC scheme is not necessary and isomitted.

In this manner, the strong filtering of the R3W2 case can be performedwithout deteriorating the accuracy.

Moreover, in the present specification, the size of the processing unitsof the deblocking filter may be the size of macroblocks of theH.264/AVC, the size of coding tree blocks of the HEVC coding units, andthe like, for example. Moreover, in the present specification, the termblock or macroblock also includes a coding unit (CU), a prediction unit(PU), and a transform unit (TU) in the context of HEVC.

A series of processes described in this specification can be performedby hardware, software, or a combination thereof. When the processes areperformed by software, a program including the process sequence can beinstalled in and executed by a memory of a computer assembled intoexclusive hardware. Alternatively, the program can be installed in andexecuted by a general-purpose computer performing various processes.

For example, the program may be recorded in advance in a hard disk or aread only memory (ROM) as a recording medium. Alternatively, the programmay be recorded temporarily or permanently on a magnetic disk (such as aflexible disk), an optical disk (such as a CD-ROM (compact disc readonly memory), a MO (magneto optical) disc, or a DVD (digital versatiledisc)), and a removable storage medium (not shown) (such as asemiconductor memory), for example. Such a removable storage medium maybe provided as so-called package software.

The program may be wirelessly transferred from a download site to thecomputer or may be transferred through wires to the computer via anetwork such as a local area network (LAN) or the Internet in additionto installing the program in the computer from the removable recordingmedium described above. The computer can receive the program transferredin this manner and install the same in a recording medium such as abuilt-in hard disk.

19. Tenth Embodiment

[Application to Multi-View Image Encoding and Decoding]

The series of processes can be applied to multi-view image encoding anddecoding. FIG. 29 illustrates an example of a multi-view image encodingscheme.

As illustrated in FIG. 29, a multi-view image includes images of aplurality of views, and an image of a predetermined single view amongthe plurality of views is designated as a base view image. Therespective view images other than the base view image are treated asnon-base view images.

When the multi-view image as illustrated in FIG. 29 is encoded, in therespective views (same views), the parameters (for example, a clippingvalue and a multiplication factor relating to tc of the clipping value)relating to the clipping process for strong filtering can be set.Moreover, in the respective views (different views), the parametersrelating the clipping process for strong filtering set to the otherviews can be shared.

In this case, the parameters relating to the clipping process set to abase view are used in at least one non-base view. Alternatively, forexample, the parameters relating to the clipping process set to anon-base view (view_id=0) are used in at least one of the base view anda non-base view (view_id=1).

Further, in the respective views (same views), the parameters relatingto the clipping process for strong filtering can be set. Moreover, inthe respective views (different views), the parameters relating theclipping process for strong filtering set to the other views can beshared.

In this case, the parameters relating to the clipping process set to abase view are used in at least one non-base view. Alternatively, forexample, the parameters relating to the clipping process set to anon-base view (view_id=0) are used in at least one of the base view anda non-base view (view_id=1).

In this manner, it is possible to allow the deblocking process to applyfiltering appropriately.

[Multi-View Image Encoding Device]

FIG. 30 is a diagram illustrating a multi-view image encoding devicethat performs the multi-view image encoding described above. Asillustrated in FIG. 30, a multi-view image encoding device 600 includesan encoding unit 601, an encoding unit 602, and a multiplexer 603.

The encoding unit 601 encodes a base view image to generate a base viewimage encoded stream. The encoding unit 602 encodes a non-base viewimage to generate a non-base view image encoded stream. The multiplexer603 multiplexes the base view image encoded stream generated by theencoding unit 601 and the non-base view image encoded stream generatedby the encoding unit 602 to generate a multi-view image encoded stream.

The image encoding device 10 (FIG. 1) can be applied to the encodingunits 601 and 602 of the multi-view image encoding device 600. In thiscase, the multi-view image encoding device 600 sets the parametersrelating to the clipping process for strong filtering set by theencoding unit 601 and the parameters relating to the clipping processfor strong filtering set by the encoding unit 602 and transfers theparameters.

As described above, the parameters relating to the clipping process forstrong filtering set by the encoding unit 601 may be transferred so asto be shared by the encoding units 601 and 602. Conversely, theparameters relating to the clipping process for strong filtering set bythe encoding unit 602 may be transferred so as to be shared by theencoding units 601 and 602.

[Multi-View Image Decoding Device]

FIG. 31 is a diagram illustrating a multi-view image decoding devicethat performs the multi-view image decoding described above. Asillustrated in FIG. 31, a multi-view image decoding device 610 includesa demultiplexer 611, a decoding unit 612, and a decoding unit 613.

The demultiplexer 611 demultiplexes the multi-view image encoded streamin which the base view image encoded stream and the non-base view imageencoded stream are multiplexed to extract the base view image encodedstream and the non-base view image encoded stream. The decoding unit 612decodes the base view image encoded stream extracted by thedemultiplexer 611 to obtain a base view image. The decoding unit 613decodes the non-base view image encoded stream extracted by thedemultiplexer 611 to obtain a non-base view image.

The image decoding device 50 (FIG. 6) can be applied to the decodingunits 612 and 613 of the multi-view image decoding device 610. In thiscase, the multi-view image decoding device 610 performs the processusing the parameters relating to the clipping process for strongfiltering, that are set by the encoding unit 601 and decoded by thedecoding unit 612 and the parameters relating to the clipping processfor strong filtering, that are set by the encoding unit 602 and decodedby the decoding unit 613.

As described above, there is a case where the parameters relating to theclipping process for strong filtering set by the encoding unit 601 (orthe encoding 602) are transferred so as to be shared by the encodingunits 601 and 602. In this case, the multi-view image decoding device610 performs the process using the parameters relating to the clippingprocess for strong filtering, that are set by the encoding unit 601 (orthe encoding 602) and decoded by the decoding unit 612 (or the decodingunit 613).

18. Eleventh Embodiment

[Application to Layer Image Encoding and Decoding]

The above series of processes can be applied to layer image encoding anddecoding. FIG. 32 illustrates an example of a multi-view image encodingscheme.

As illustrated in FIG. 32, a layer image includes images of a pluralityof layers (resolutions), and an image of a predetermined single layeramong the plurality of resolutions is designated as a base layer image.The respective layer images other than the base layer image are treatedas non-base layer images.

When the layer image encoding (space scalability) as illustrated in FIG.32 is performed, in the respective layers (same layers), the parametersrelating to the clipping process for strong filtering can be set.Moreover, in the respective layers (different layers), the parametersrelating to the clipping process for strong filtering set to the otherlayers can be shared.

In this case, the parameters relating to the clipping process for strongfiltering set to a base layer are used in at least one non-base layer.Alternatively, for example, the parameters relating to the clippingprocess for strong filtering set to a non-base layer (layer_id=0) areused in at least one of the base layer and a non-base layer(layer_id=1).

Further, in the respective layers (same layers), the parameters relatingto the clipping process for strong filtering can be set. Moreover, inthe respective layers (different layers), the parameters relating to theclipping process for strong filtering set to the other views can beshared.

In this case, the parameters relating to the clipping process for strongfiltering set to a base layer are used in at least one non-base layer.Alternatively, for example, the parameters relating to the clippingprocess for strong filtering set to a non-base layer (layer_id=0) areused in at least one of the base layer and a non-base layer(layer_id=1).

In this manner, it is possible to allow the deblocking process to applyfiltering appropriately.

[Layer Image Encoding Device]

FIG. 33 is a diagram illustrating a layer image encoding device thatperforms the layer image encoding described above. As illustrated inFIG. 33, a layer image encoding device 620 includes an encoding unit621, an encoding unit 622, and a multiplexer 623.

The encoding unit 621 encodes a base layer image to generate a baselayer image encoded stream. The encoding unit 622 encodes a non-baselayer image to generate a non-base layer image encoded stream. Themultiplexer 623 multiplexes the base layer image encoded streamgenerated by the encoding unit 621 and the non-base layer image encodedstream generated by the encoding unit 622 to generate a layer imageencoded stream.

The image encoding device 10 (FIG. 1) can be applied to the encodingunits 621 and 622 of the layer image encoding device 620. In this case,the layer image encoding device 620 sets the parameters relating to theclipping process for strong filtering set by the encoding unit 621 andthe parameters relating to the clipping process for strong filtering setby the encoding unit 602 and transfers the parameters.

As described above, the parameters relating to the clipping process forstrong filtering set by the encoding unit 621 may be transferred so asto be shared by the encoding units 621 and 622. Conversely, theparameters relating to the clipping process for strong filtering set bythe encoding unit 622 may be transferred so as to be shared by theencoding units 621 and 622.

[Layer Image Decoding Device]

FIG. 34 is a diagram illustrating a layer image decoding device thatperforms the layer image decoding described above. As illustrated inFIG. 34, a layer image decoding device 630 includes a demultiplexer 631,a decoding unit 632, and a decoding unit 633.

The demultiplexer 631 demultiplexes the layer image encoded stream inwhich the base layer image encoded stream and the non-base layer imageencoded stream are multiplexed to extract the base layer image encodedstream and the non-base layer image encoded stream. The decoding unit632 decodes the base layer image encoded stream extracted by thedemultiplexer 631 to obtain a base layer image. The decoding unit 633decodes the non-base layer image encoded stream extracted by thedemultiplexer 631 to obtain a non-base layer image.

The image decoding device 50 (FIG. 6) can be applied to the decodingunits 632 and 633 of the multi-view image decoding device 630. In thiscase, the multi-view image decoding device 630 performs the processusing the parameter relating to the clipping process for strongfiltering, that are set by the encoding unit 621 and decoded by thedecoding unit 632 and the parameters relating to the clipping processfor strong filtering, that are set by the encoding unit 622 and decodedby the decoding unit 633.

As described above, there is a case where the parameters relating to theclipping process for strong filtering set by the encoding unit 621 (orthe encoding 622) are transferred so as to be shared by the encodingunits 621 and 622. In this case, the multi-view image decoding device630 performs the process using the parameters relating to the clippingprocess for strong filtering, that are set by the encoding unit 621 (orthe encoding 622) and decoded by the decoding unit 632 (or the decodingunit 633).

19. Application Example

The image encoding device 10 and the image decoding device 50 accordingto the above-described embodiments can be applied to various electronicapparatuses such as a transmitter or a receiver that distributes signalson cable broadcasting (such as satellite broadcasting or a cable TV) oron the Internet and distributes signals to a terminal by cellularcommunication, a recording device that records images on a medium suchas an optical disc, a magnetic disk, or a flash memory, or a reproducingdevice that reproduces images from these storage media. Four applicationexamples will be described below.

First Application Example

FIG. 35 illustrates an example of a schematic configuration of atelevision apparatus to which the above-described embodiment is applied.A television apparatus 900 includes an antenna 901, a tuner 902, ademultiplexer 903, a decoder 904, a video signal processor 905, adisplay unit 906, an audio signal processor 907, a speaker 908, and anexternal interface 909. The television apparatus 900 further includes acontroller 910, a user interface 911, and the like.

The tuner 902 extracts a signal of a desired channel from a broadcastsignal received through the antenna 901 and demodulates the extractedsignal. Then, the tuner 902 outputs an encoded bit stream obtained bydemodulation to the demultiplexer 903. That is, the tuner 902 serves astransmitting means in the television apparatus 900, which receives theencoded stream in which the image is encoded.

The demultiplexer 903 separates a video stream and an audio stream of aprogram to be watched from the encoded bit stream and outputs eachseparated stream to the decoder 904. Moreover, the demultiplexer 903extracts auxiliary data such as EPG (Electronic Program Guide) from theencoded bit stream and supplies the extracted data to the controller910. The demultiplexer 903 may descramble when the encoded bit stream isscrambled.

The decoder 904 decodes the video stream and the audio stream input fromthe demultiplexer 903. Then, the decoder 904 outputs video datagenerated by a decoding process to the video signal processor 905.Moreover, the decoder 904 outputs audio data generated by the decodingprocess to the audio signal processor 907.

The video signal processor 905 reproduces the video data input from thedecoder 904 and allows the display unit 906 to display video. The videosignal processor 905 may also allow the display unit 906 to display anapplication screen supplied through the network. The video signalprocessor 905 may also perform an additional process such as noiseremoval, for example, to the video data according to setting. Further,the video signal processor 905 may generate a GUI (Graphical UserInterface) image such as a menu, a button, and a cursor, for example,and superimpose the generated image on an output image.

The display unit 906 is driven by a drive signal supplied from the videosignal processor 905 to display the video or image on a video screen ofa display device (for example, a liquid crystal display, a plasmadisplay, an OLED, and the like).

The audio signal processor 907 performs a reproducing process such asD/A conversion and amplification to the audio data input from thedecoder 904 and allows the speaker 908 to output the audio. The audiosignal processor 907 may also perform an additional process such as thenoise removal to the audio data. The external interface 909 is theinterface for connecting the television apparatus 900 and an externaldevice or the network. For example, the video stream or the audio streamreceived through the external interface 909 may be decoded by thedecoder 904. That is, the external interface 909 also serves as thetransmitting means in the television apparatus 900, which receives theencoded stream in which the image is encoded.

The controller 910 includes a processor such as a central processingunit (CPU) and a memory such as a random access memory (RAM) and a readonly memory (ROM). The memory stores the program executed by the CPU,program data, the EPG data, data obtained through the network and thelike. The program stored in the memory is read by the CPU at startup ofthe television apparatus 900 to be executed, for example. The CPUcontrols operation of the television apparatus 900 according to anoperation signal input from the user interface 911, for example, byexecuting the program.

The user interface 911 is connected to the controller 910. The userinterface 911 includes a button and a switch for the user to operate thetelevision apparatus 900, a receiver of a remote control signal and thelike, for example. The user interface 911 detects operation by the userthrough the components to generate the operation signal and outputs thegenerated operation signal to the controller 910.

The bus 912 connects the tuner 902, the demultiplexer 903, the decoder904, the video signal processor 905, the audio signal processor 907, theexternal interface 909, and the controller 910 to one another.

In the television apparatus 900 configured in this manner, the decoder904 has the functions of the image decoding device 50 according to theabove-described embodiment. Therefore, when images are decoded in thetelevision apparatus 900, the deblocking filtering process can applyfiltering appropriately.

Second Application Example

FIG. 36 illustrates an example of a schematic configuration of a mobilephone to which the above-described embodiment is applied. A mobile phone920 includes an antenna 921, a communication unit 922, an audio codec923, a speaker 924, a microphone 925, a camera unit 926, an imageprocessor 927, a demultiplexer 928, a recording/reproducing unit 929, adisplay unit 930, a controller 931, an operation unit 932, and a bus933.

The antenna 921 is connected to the communication unit 922. The speaker924 and the microphone 925 are connected to the audio codec 923. Theoperation unit 932 is connected to the controller 931. The bus 933connects the communication unit 922, the audio codec 923, the cameraunit 926, the image processor 927, the demultiplexer 928, therecording/reproducing unit 929, the display unit 930, and the controller931 to one another.

The mobile phone 920 performs operation such as transmission/receptionof an audio signal, transmission/reception of an e-mail or image data,image taking, and recording of data in various operation modes includingan audio communication mode, a data communication mode, an imaging mode,and a television-phone mode.

In the audio communication mode, an analog audio signal generated by themicrophone 925 is supplied to the audio codec 923. The audio codec 923converts the analog audio signal to the audio data and A/D converts theconverted audio data to compress. Then, the audio codec 923 outputs thecompressed audio data to the communication unit 922. The communicationunit 922 encodes and modulates the audio data to generate a transmissionsignal. Then, the communication unit 922 transmits the generatedtransmission signal to a base station (not illustrated) through theantenna 921. Moreover, the communication unit 922 amplifies a wirelesssignal received through the antenna 921 and applies frequency conversionto the same to obtain a reception signal. Then, the communication unit922 generates the audio data by demodulating and decoding the receptionsignal and outputs the generated audio data to the audio codec 923. Theaudio codec 923 expands the audio data and D/A converts the same togenerate the analog audio signal. Then, the audio codec 923 supplies thegenerated audio signal to the speaker 924 to allow the same to outputthe audio.

In the data communication mode, for example, the controller 931generates character data composing the e-mail according to the operationby the user through the operation unit 932. Moreover, the controller 931allows the display unit 930 to display characters. The controller 931generates e-mail data according to a transmission instruction from theuser through the operation unit 932 to output the generated e-mail datato the communication unit 922. The communication unit 922 encodes andmodulates the e-mail data to generate the transmission signal. Then, thecommunication unit 922 transmits the generated transmission signal tothe base station (not illustrated) through the antenna 921. Moreover,the communication unit 922 amplifies the wireless signal receivedthrough the antenna 921 and applies the frequency conversion to the sameto obtain the reception signal. Then, the communication unit 922demodulates and decodes the reception signal to restore the e-mail dataand outputs the restored e-mail data to the controller 931. Thecontroller 931 allows the display unit 930 to display contents of thee-mail data and allows the storage medium of the recording/reproducingunit 929 to store the e-mail data.

The recording/reproducing unit 929 includes an arbitraryreadable/writable storage medium. For example, the storage medium may bea built-in storage medium such as the RAM and the flash memory and maybe an externally-mounted storage medium such as the hard disc, themagnetic disc, the magneto-optical disc, the optical disc, a USB memory,and a memory card.

In the imaging mode, for example, the camera unit 926 takes an image ofan object to generate the image data and outputs the generated imagedata to the image processor 927. The image processor 927 encodes theimage data input from the camera unit 926 and stores the encoded streamin the storage medium of the recording/reproducing unit 929.

Moreover, in the television-phone mode, for example, the demultiplexer928 multiplexes the video stream encoded by the image processor 927 andthe audio stream input from the audio codec 923 and outputs themultiplexed stream to the communication unit 922. The communication unit922 encodes and modulates the stream to generate the transmissionsignal. Then, the communication unit 922 transmits the generatedtransmission signal to the base station (not illustrated) through theantenna 921. Moreover, the communication unit 922 amplifies the wirelesssignal received through the antenna 921 and applies the frequencyconversion to the same to obtain the reception signal. The transmissionsignal and the reception signal may include the encoded bit stream.Then, the communication unit 922 restores the stream by demodulating anddecoding the reception signal and outputs the restored stream to thedemultiplexer 928. The demultiplexer 928 separates the video stream andthe audio stream from the input stream and outputs the video stream andthe audio stream to the image processor 927 and the audio codec 923,respectively. The image processor 927 decodes the video stream togenerate the video data. The video data is supplied to the display unit930 and a series of images is displayed by the display unit 930. Theaudio codec 923 expands the audio stream and D/A converts the same togenerate the analog audio signal. Then, the audio codec 923 supplies thegenerated audio signal to the speaker 924 to output the audio.

In the mobile phone 920 configured in this manner, the image processor927 has the functions of the image encoding device 10 and the imagedecoding device 50 according to the above-described embodiment.Therefore, when images are encoded and decoded in the mobile phone 920,the deblocking filtering process can apply filtering appropriately.

Third Application Example

FIG. 37 illustrates an example of a schematic configuration of therecording/reproducing device to which the above-described embodiment isapplied. The recording/reproducing device 940 encodes the audio data andthe video data of a received broadcast program to record on therecording medium, for example. Moreover, the recording/reproducingdevice 940 may encode the audio data and the video data obtained fromanother apparatus to record on the recording medium, for example.Moreover, the recording/reproducing device 940 reproduces the datarecorded on the recording medium by a monitor and the speaker accordingto the instruction of the user. In this case, the recording/reproducingdevice 940 decodes the audio data and the video data.

The recording/reproducing device 940 includes a tuner 941, an externalinterface 942, an encoder 943, a HDD (Hard Disk Drive) 944, a disk drive945, a selector 946, a decoder 947, an OSD (On-Screen Display) 948, acontroller 949, and a user interface 950.

The tuner 941 extracts a signal of a desired channel from the broadcastsignal received through an antenna (not illustrated) and demodulates theextracted signal. Then, the tuner 941 outputs the encoded bit streamobtained by the demodulation to the selector 946. That is, the tuner 941serves as the transmitting means in the recording/reproducing device940.

The external interface 942 is the interface for connecting therecording/reproducing device 940 and the external device or the network.The external interface 942 may be an IEEE1394 interface, a networkinterface, a USB interface, a flash memory interface and the like, forexample. For example, the video data and the audio data received throughthe external interface 942 are input to the encoder 943. That is, theexternal interface 942 serves as the transmitting means in therecording/reproducing device 940.

The encoder 943 encodes the video data and the audio data when the videodata and the audio data input from the external interface 942 are notencoded. Then, the encoder 943 outputs the encoded bit stream to theselector 946.

The HDD 944 records the encoded bit stream in which content data such asthe video and the audio are compressed, various programs and other dataon an internal hard disc. The HDD 944 reads the data from the hard discwhen reproducing the video and the audio.

The disk drive 945 records and reads the data on and from the mountedrecording medium. The recording medium mounted on the disk drive 945 maybe the DVD disc (DVD-Video, DVD-RAM, DVD-R, DVD-RW, DVD+R, DVD+RW andthe like), a Blu-ray (registered trademark) disc and the like, forexample. The selector 946 selects the encoded bit stream input from thetuner 941 or the encoder 943 and outputs the selected encoded bit streamto the HDD 944 or the disk drive 945 when recording the video and theaudio. Moreover, the selector 946 outputs the encoded bit stream inputfrom the HDD 944 or the disk drive 945 to the decoder 947 whenreproducing the video and the audio.

The decoder 947 decodes the encoded bit stream to generate the videodata and the audio data. Then, the decoder 947 outputs the generatedvideo data to the OSD 948. Moreover, the decoder 904 outputs thegenerated audio data to an external speaker. The OSD 948 reproduces thevideo data input from the decoder 947 to display the video. The OSD 948may also superimpose the GUI image such as the menu, the button, and thecursor, for example, on the displayed video.

The controller 949 includes the processor such as the CPU and the memorysuch as the RAM and ROM. The memory stores the program executed by theCPU, the program data and the like. The program stored in the memory isread by the CPU to be executed on activation of therecording/reproducing device 940, for example. The CPU controlsoperation of the recording/reproducing device 940 according to anoperation signal input from the user interface 950, for example, byexecuting the program.

The user interface 950 is connected to the controller 949. The userinterface 950 includes a button and a switch for the user to operate therecording/reproducing device 940 and a receiver of a remote controlsignal, for example. The user interface 950 detects operation by theuser through the components to generate the operation signal and outputsthe generated operation signal to the controller 949.

In the recording/reproducing device 940 configured in this manner, theencoder 943 has the functions of the image encoding device 10 accordingto the above-described embodiment. Moreover, the decoder 947 has thefunctions of the image decoding device 50 according to theabove-described embodiment. Therefore, when images are encoded anddecoded in the recording/reproducing device 940, the deblockingfiltering process can apply filtering appropriately.

Fourth Application Example

FIG. 38 illustrates an example of a schematic configuration of animaging device to which the above-described embodiment is applied. Animaging device 960 images an object to generate the image, encodes theimage data, and records the same on a recording medium.

The imaging device 960 includes an optical block 961, an imaging unit962, a signal processor 963, an image processor 964, a display unit 965,an external interface 966, a memory 967, a media drive 968, an OSD 969,a controller 970, a user interface 971, and a bus 972.

The optical block 961 includes a focus lens, a diaphragm mechanism, andthe like. The optical block 961 forms an optical image of the object onan imaging surface of the imaging unit 962. The imaging unit 962includes an image sensor such as a CCD and a CMOS and converts theoptical image formed on the imaging surface to an image signal as anelectric signal by photoelectric conversion. Then, the imaging unit 962outputs the image signal to the signal processor 963.

The signal processor 963 performs various camera signal processes suchas knee correction, gamma correction, or color correction to the imagesignal input from the imaging unit 962. The signal processor 963 outputsthe image data after the camera signal process to the image processor964.

The image processor 964 encodes the image data input from the signalprocessor 963 to generate the encoded data. Then, the image processor964 outputs the generated encoded data to the external interface 966 orthe media drive 968. Moreover, the image processor 964 decodes theencoded data input from the external interface 966 or the media drive968 to generate the image data. Then, the image processor 964 outputsthe generated image data to the display unit 965. The image processor964 may also output the image data input from the signal processor 963to the display unit 965 to display the image. The image processor 964may also superimpose data for display obtained from the OSD 969 on theimage output to the display unit 965.

The OSD 969 generates the GUI image such as the menu, the button, andthe cursor, for example, and outputs the generated image to the imageprocessor 964.

The external interface 966 is configured as an USB input/outputterminal, for example. The external interface 966 connects the imagingdevice 960 and a printer when printing the image, for example. Moreover,a drive is connected to the external interface 966 as necessary. Theremovable medium such as the magnetic disc and the optical disc ismounted on the drive, for example, and the program read from theremovable medium may be installed on the imaging device 960. Further,the external interface 966 may be configured as a network interfaceconnected to the network such as a LAN and the Internet. That is, theexternal interface 966 serves as the transmitting means in the imagingdevice 960.

The recording medium mounted on the media drive 968 may be an arbitraryreadable/writable removable medium such as the magnetic disc, themagneto-optical disc, the optical disc, and the semiconductor memory,for example. Moreover, the recording medium may be fixedly mounted onthe media drive 968 to form a non-portable storage unit such as abuilt-in hard disk drive or SSD (Solid State Drive), for example.

The controller 970 includes the processor such as the CPU and the memorysuch as the RAM and the ROM. The memory stores the program executed bythe CPU and the program data. The program stored in the memory is readby the CPU at startup of the imaging device 960 to be executed, forexample. The CPU controls operation of the imaging device 960 accordingto the operation signal input from the user interface 971, for example,by executing the program.

The user interface 971 is connected to the controller 970. The userinterface 971 includes a button, a switch and the like for the user tooperate the imaging device 960, for example. The user interface 971detects the operation by the user through the components to generate theoperation signal and outputs the generated operation signal to thecontroller 970.

The bus 972 connects the image processor 964, the external interface966, the memory 967, the media drive 968, the OSD 969, and thecontroller 970 to one another.

In the imaging device 960 configured in this manner, the image processor964 has the functions of the image encoding device 10 and the imagedecoding device 50 according to the above-described embodiment.Therefore, when images are encoded and decoded in the imaging device960, the deblocking filtering process can apply filtering appropriately.

In the present specification, an example in which various types ofinformation such as the parameters relating to the clipping process forstrong filtering are multiplexed into encoded streams and aretransmitted from the encoding side to the decoding side has beendescribed. However, a method of transmitting these items of informationis not limited to this example. For example, these items of informationmay be transmitted or recorded as separate data associated with theencoded bit stream rather than being multiplexed into the encoded bitstream. Here, the term “associate” means that the image (or part of theimage such as a slice and a block) included in the bit stream andinformation corresponding to the image can be linked with each other atthe time of decoding. That is, the information may be transmitted on atransmission line other than that of the image (or bit stream).Moreover, the information may be recorded on another recording medium(or another recording area of the same recording medium) other than thatof the image (or bit stream). Further, the information and the image (orbit stream) may be associated with each other in optional units such asa plurality of frames, one frame, or a part of the frame, for example.

Furthermore, the present technique is not to be interpreted as beinglimited to the above-described embodiments. The embodiments disclose thepresent technique in an exemplary and illustrative form, and it isobvious that modifications and substitutions may occur to those skilledin the art without departing from the spirit of the present technique.In other words, the spirit of the present technique should be determinedin consideration of the claims.

Note that the image processing device of this technique may include thefollowing constitutions.

(1) An Image Processing Device Including:

a decoding unit that decodes an encoded stream encoded in units eachhaving a layer structure to generate an image;

a filtering unit that applies a deblocking filter to a block boundaryaccording to a strength of the deblocking filter applied to the blockboundary which is a boundary between a block of the image generated bythe decoding unit and an adjacent block adjacent to the block; and

a controller that controls the filtering unit so that, when strongfiltering is applied as the strength of the deblocking filter, aclipping process is applied to the deblocking filter with respect toluminance components of the image generated by the decoding unit.

(2) The image processing device according to (1), wherein

the controller applies the clipping process to values of parts thatchange when the deblocking filter is applied.

(3) The image processing device according to (2), wherein

the controller applies the clipping process according to the followingexpressions:p0_(i) =p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3);q0_(i) =q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p0_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3);p1_(i) =p1_(i)+Clip_((−pv)−(pv))((p2_(i)−3*p1_(i) +p0_(i)+q0_(i)+2)>>2);q1_(i) =q1_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)−3*q1_(i)+q2_(i)+2)>>2);p2_(i) =p2_(i)+Clip_((−pv)−(pv))((2*p2_(i)−5*p2_(i) +p1_(i) +p0_(i)+q0_(i)+4)>>3);q2_(i) =q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+p1_(i)−5*q2_(i)+2*q3_(i)+4)>>3);  [Mathematical formula 37]

where i=0, 7 and pv is a clipping value.

(4) The image processing device according to (3), wherein

the controller sets a value that is integer multiples of parameters ofthe deblocking filter as the clipping value used when the clippingprocess is performed.

(5) The image processing device according to (4), wherein

the controller sets a value that is twice the parameters of thedeblocking filter as the clipping value used when the clipping processis performed.

(6) The image processing device according to any of (1) to (5), furtherincluding:

a filter strength determining unit that determines the strength of thedeblocking filter applied to the block boundary, wherein

the filtering unit applies the deblocking filter to the block boundaryaccording to the strength determined by the filter strength determiningunit, and

the controller controls the filtering unit so that, when the filterstrength determining unit determines that strong filtering is to beapplied, a clipping process is applied to the deblocking filter withrespect to the luminance components of the image generated by thedecoding unit.

(7) The image processing device according to (6), wherein

the filter strength determining unit determines the strength of thedeblocking filter using a plurality of lines as processing units.

(8) The image processing device according to (7), wherein

the filter strength determining unit determines the strength of thedeblocking filter using four lines as the processing units.

(9) The image processing device according to (7), further including:

a filtering necessity determining unit that determines whether thedeblocking filter is to be applied to the block boundary using aplurality of lines as processing units, wherein

the filter strength determining unit determines the strength of thedeblocking filter when the filtering necessity determining unitdetermines that the deblocking filter is to be applied.

(10) An image processing method for allowing an image processing deviceto execute:

decoding an encoded stream encoded in units each having a layerstructure to generate an image;

applying a deblocking filter to a block boundary according to a strengthof the deblocking filter applied to the block boundary which is aboundary between a block of the generated image and an adjacent blockadjacent to the block; and

controlling so that, when strong filtering is applied as the strength ofthe deblocking filter, a clipping process is applied to the deblockingfilter with respect to luminance components of the generated image.

(11) An image processing device including:

a filtering unit that applies a deblocking filter to a block boundaryaccording to a strength of the deblocking filter applied to the blockboundary which is a boundary between a block of an image locally decodedwhen an image is encoded and an adjacent block adjacent to the block;

a controller that controls the filtering unit so that, when strongfiltering is applied as the strength of the deblocking filter, aclipping process is applied to the deblocking filter with respect toluminance components of the locally decoded image; and

an encoding unit that encodes the image in units each having a layerstructure using an image to which the deblocking filter is applied.

(12) The image processing device according to (11), wherein

the controller applies the clipping process to values of parts thatchange when the deblocking filter is applied.

(13) The image processing device according to (12), wherein

the controller applies the clipping process according to the followingexpressions:p0_(i) =p0_(i)+Clip_((−pv)−(pv))((p2_(i)+2*p1_(i)−6*p0_(i)+2*q0_(i)+q1_(i)+4)>>3);q0_(i) =q0_(i)+Clip_((−pv)−(pv))((p1_(i)+2*p0_(i)−6*q0_(i)+2*q1_(i)+q2_(i)+4)>>3);p1_(i) =p1_(i)+Clip_((−pv)−(pv))((p2_(i)−3*p1_(i) +p0_(i)+q0_(i)+2)>>2);q1_(i) =q1_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)−3*q1_(i)+q2_(i)+2)>>2);p2_(i) =p2_(i)+Clip_((−pv)−(pv))((2*p2_(i)−5*p2_(i) +p1_(i) +p0_(i)+q0_(i)+4)>>3);q2_(i) =q2_(i)+Clip_((−pv)−(pv))((p0_(i) +q0_(i)+p1_(i)−5*q2_(i)+2*q3_(i)+4)>>3);  [Mathematical formula 38]

where i=0, 7 and pv is a clipping value.

(14) The image processing device according to (13), wherein

the controller sets a value that is integer multiples of parameters ofthe deblocking filter as the clipping value used when the clippingprocess is performed.

(15) The image processing device according to (14), wherein

the controller sets a value that is twice the parameters of thedeblocking filter as the clipping value used when the clipping processis performed.

(16) The image processing device according to any of (11) to (15),further including:

a filter strength determining unit that determines the strength of thedeblocking filter applied to the block boundary, wherein

the filtering unit applies the deblocking filter to the block boundaryaccording to the strength determined by the filter strength determiningunit, and

the controller controls the filtering unit so that, when the filterstrength determining unit determines that strong filtering is to beapplied, a clipping process is applied to the deblocking filter withrespect to the luminance components of the image generated by thedecoding unit.

(17) The image processing device according to (16), wherein

the filter strength determining unit determines the strength of thedeblocking filter using a plurality of lines as processing units.

(18) The image processing device according to (17), wherein

the filter strength determining unit determines the strength of thedeblocking filter using four lines as the processing units.

(19) The image processing device according to (17), further including:

a filtering necessity determining unit that determines whether thedeblocking filter is to be applied to the block boundary using aplurality of lines as processing units, wherein

the filter strength determining unit determines the strength of thedeblocking filter when the filtering necessity determining unitdetermines that the deblocking filter is to be applied.

(20) An image processing method for allowing an image processing deviceto execute:

applying a deblocking filter to a block boundary according to a strengthof the deblocking filter applied to the block boundary which is aboundary between a block of an image locally decoded when an image isencoded and an adjacent block adjacent to the block;

controlling so that, when strong filtering is applied as the strength ofthe deblocking filter, a clipping process is applied to the deblockingfilter with respect to luminance components of the locally decodedimage; and

encoding the image in units each having a layer structure using an imageto which the deblocking filter is applied.

REFERENCE SIGNS LIST

-   -   10: Image encoding device    -   11: A/D converter    -   12, 57: Frame reordering buffer    -   13: Subtractor    -   14: Orthogonal transformer    -   15: Quantizer    -   16: Lossless encoder    -   17: Accumulation buffer    -   18: Rate controller    -   21, 53: Inverse quantizer    -   22, 54: Inverse orthogonal transformer    -   23, 55: Adder    -   24, 56: Deblocking filtering unit    -   25, 61: Frame memory    -   26, 62, 65: Selector    -   31, 63: Intra predictor    -   32: Motion estimator/compensator    -   33: Predicted image/optimal mode selecting unit    -   50: Image decoding device    -   51: Accumulation buffer    -   52: Lossless decoder    -   61: Frame memory    -   64: Motion compensation unit    -   71: Image memory    -   72, 72-1: Block boundary determining unit    -   72-2: Line boundary/block boundary determining unit    -   73, 73-1: Filter strength determining unit    -   73-2: Line boundary filter strength determining unit    -   74, 74-1: Filter operation unit    -   74-2: Line boundary filter operation unit    -   75: Selector    -   76: Coefficient memory    -   77: Controller    -   77A, 77B: Intra-LCU line determining unit    -   241: Line memory    -   242: Line boundary detecting unit    -   243: Filter strength determining unit    -   244: Coefficient memory    -   245: Filter operation unit    -   246: Filter controller    -   2451: Data storage unit    -   2452: Data selecting unit    -   2453, 2455, 2456: Arithmetic processing unit    -   2457: Data selecting unit    -   2461: Line boundary determining unit

The invention claimed is:
 1. An image processing device comprising:circuitry configured to apply a deblocking filter including a firstdeblocking filter and a second deblocking filter, which is differentfrom the first deblocking filter and has a stronger filter strength thanthe first deblocking filter, to neighboring pixels neighboring a blockboundary within a decoded image generated by the circuitry; control, asa condition that the second deblocking filter is applied, the seconddeblocking filter so as to apply a second clipping process to adifference value changed by the second deblocking filter using a secondclipping value to generate a filtered image; and encode an image usingthe filtered image, wherein a first clipping process is applied using afirst clipping value as a condition that the first deblocking filter isapplied, and the second clipping process is applied according to thefollowing expressions: $\begin{matrix}{{{p\; 0^{\prime}} = {{p\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} - {6^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 0} - {pv}})} - {({{p\; 0} + {pv}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 0} - {p\; v}},{{p\; 0} + {pv}},{\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 1^{\prime}} = {{p\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} - {3^{*}p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 1} - {pv}})} - {({{p\; 1} + {pv}})}}\left( {\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 1} - {p\; v}},{{p\; 1} + {pv}},{\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 2^{\prime}} = {{p\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{2^{*}p\; 3} - {5^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 2} - {pv}})} - {({{p\; 2} + {pv}})}}\left( {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 2} - {p\; v}},{{p\; 2} + {pv}},{\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 0^{\prime}} = {{q\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} - {6^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 0} - {pv}})} - {({{q\; 0} + {pv}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 0} - {p\; v}},{{q\; 0} + {pv}},{\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 1^{\prime}} = {{q\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} - {3^{*}q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{q\; 1} - {pv}})} - {({{q\; 1} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 1} - {p\; v}},{{q\; 1} + {pv}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 2^{\prime}} = {{q\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} - {5^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 2} - {pv}})} - {({{q\; 2} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 2} - {p\; v}},{{q\; 2} + {pv}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ where p0′, p1′, p2′, q0′, q1′ and q2′ are pixels filteredby the second deblocking filter, p0, p1, p2, q0, q1 and q2 are pixels ofthe decoded image data, and pv is the second clipping value.
 2. Theimage processing device according to claim 1, wherein the secondclipping value is 2*tc and the first clipping value is tc; where tc is avalue set based on a predetermined quantization parameter.
 3. The imageprocessing device according to claim 2, wherein the circuitry isconfigured to apply, as the condition that the second deblocking filteris applied, the second clipping process according to the followingexpressions: $\begin{matrix}{{{p\; 0^{\prime}} = {{p\; 0} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} - {6^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 0} - {2^{*}{tc}}})} - {({{p\; 0} + {2^{*}{tc}}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 0} - {2^{*}{tc}}},{{p\; 0} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{p\; 1^{\prime}} = {{p\; 1} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 2} - {3^{*}p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 1} - {2^{*}{tc}}})} - {({{p\; 1} + {2^{*}{tc}}})}}\left( {\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 1} - {2^{*}{tc}}},{{p\; 1} + {2^{*}{tc}}},{\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 1^{\prime}} = {{q\; 1} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 0} + {q\; 0} - {3^{*}q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{q\; 1} - {2^{*}{tc}}})} - {({{q\; 1} + {2^{*}{tc}}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 1} - {2^{*}{tc}}},{{q\; 1} + {2^{*}{tc}}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 2^{\prime}} = {{p\; 2} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{2^{*}p\; 3} - {5^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 2} - {2^{*}{tc}}})} - {({{p\; 2} + {2^{*}{tc}}})}}\left( {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 2} - {2^{*}{tc}}},{{p\; 2} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{q\; 0^{\prime}} = {{q\; 0} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} - {6^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 0} - {2^{*}{tc}}})} - {({{q\; 0} + {2^{*}{tc}}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{q\; 0} - {2^{*}{tc}}},{{q\; 0} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{q\; 2^{\prime}} = {{q\; 2} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} - {5^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 2} - {2^{*}{tc}}})} - {({{q\; 2} + {2^{*}{tc}}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 2} - {2^{*}{tc}}},{{q\; 2} + {2^{*}{tc}}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ where tc is the value set based on a predeterminedquantization parameter.
 4. The image processing device according toclaim 3, wherein the circuitry is configured to apply the seconddeblocking filter to luminance components of pixels neighboring a blockboundary.
 5. The image processing device according to claim 4, whereinthe second deblocking filter is configured to filter six neighboringpixels, and the first deblocking filter is configured to filter fourneighboring pixels as a weak filter.
 6. The image processing deviceaccording to claim 1 or 3, wherein the circuitry is configured to;transform the image to generate transform coefficient data; quantize thetransform coefficient data to generate quantized data; and perform anarithmetic encoding process on the quantized data.
 7. The imageprocessing device according to claim 1, wherein the second clippingvalue is an integer multiple of the first clipping value.
 8. A methodimplemented by an image processing device, comprising: applying adeblocking filter including a first deblocking filter and a seconddeblocking filter, which is different from the first deblocking filterand has a stronger filter strength than the first deblocking filter, toneighboring pixels neighboring a block boundary within a decoded imagegenerated by the circuitry; controlling, as a condition that the seconddeblocking filter is applied, the second deblocking filter so as toapply a second clipping process to a difference value changed by thesecond deblocking filter using a second clipping value to generate afiltered image; and encoding an image using the filtered image wherein afirst clipping process is applied using a first clipping value as acondition that the first deblocking filter is applied, and the secondclipping process is applied according to the following expressions:$\begin{matrix}{{{p\; 0^{\prime}} = {{p\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} - {6^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 0} - {pv}})} - {({{p\; 0} + {pv}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 0} - {p\; v}},{{p\; 0} + {pv}},{\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 1^{\prime}} = {{p\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} - {3^{*}p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 1} - {pv}})} - {({{p\; 1} + {pv}})}}\left( {\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 1} - {p\; v}},{{p\; 1} + {pv}},{\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 2^{\prime}} = {{p\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{2^{*}p\; 3} - {5^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 2} - {pv}})} - {({{p\; 2} + {pv}})}}\left( {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 2} - {p\; v}},{{p\; 2} + {pv}},{\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 0^{\prime}} = {{q\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} - {6^{*}q\; 0} + {2^{*}q\; 0} + {q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 0} - {pv}})} - {({{q\; 0} + {pv}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 0} - {p\; v}},{{q\; 0} + {pv}},{\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 1^{\prime}} = {{q\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} - {3^{*}q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{q\; 1} - {pv}})} - {({{q\; 1} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 1} - {p\; v}},{{q\; 1} + {pv}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 2^{\prime}} = {{q\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} - {5^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 2} - {pv}})} - {({{q\; 2} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 2} - {p\; v}},{{q\; 2} + {pv}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ where p0′, p1′, p2′, q0′, q1′ and q2′ are pixels filteredby the second deblocking filter, p0, p1, p2, q0, q1 and q2 are pixels ofthe decoded image data, and pv is the second clipping value.
 9. Themethod according to claim 8, wherein the second clipping value is 2*tcand the first clipping value is tc; where tc is a value set based on apredetermined quantization parameter.
 10. The method according to claim9, further comprising: applying, as the condition that the seconddeblocking filter is applied, the second clipping process according tothe following expressions: $\begin{matrix}{{{p\; 0^{\prime}} = {{p\; 0} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} - {6^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1_{i}} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 0} - {2^{*}{tc}}})} - {({{p\; 0} + {2^{*}{tc}}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 0} - {2^{*}{tc}}},{{p\; 0} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{p\; 1^{\prime}} = {{p\; 1} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 2} - {3^{*}p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 1} - {2^{*}{tc}}})} - {({{p\; 1} + {2^{*}{tc}}})}}\left( {\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 1} - {2^{*}{tc}}},{{p\; 1} + {2^{*}{tc}}},{\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{q\; 1^{\prime}} = {{q\; 1} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 0} + {q\; 0} - {3^{*}q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{q\; 1} - {2^{*}{tc}}})} - {({{q\; 1} + {2^{*}{tc}}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 1} - {2^{*}{tc}}},{{q\; 1} + {2^{*}{tc}}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2}} \right)}};}\end{matrix}$ $\begin{matrix}{{{p\; 2^{\prime}} = {{p\; 2} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{2^{*}p\; 3} - {5^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 2} - {2^{*}{tc}}})} - {({{p\; 2} + {2^{*}{tc}}})}}\left( {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 2} - {2^{*}{tc}}},{{p\; 2} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{q\; 0^{\prime}} = {{q\; 0} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} - {6^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 0} - {2^{*}{tc}}})} - {({{q\; 0} + {2^{*}{tc}}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{q\; 0} - {2^{*}{tc}}},{{q\; 0} + {2^{*}{tc}}},} \right.}} \\{\left. {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right);}\end{matrix}$ $\begin{matrix}{{{q\; 2^{\prime}} = {{q\; 2} + {{Clip}_{{({{- 2^{*}}{tc}})} - {({2^{*}{tc}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} - {5^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 2} - {2^{*}{tc}}})} - {({{q\; 2} + {2^{*}{tc}}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 2} - {2^{*}{tc}}},{{q\; 2} + {2^{*}{tc}}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3}} \right)}};}\end{matrix}$ where tc is the value set based on a predeterminedquantization parameter.
 11. The method according to claim 10, furthercomprising: applying the second deblocking filter to luminancecomponents of pixels neighboring a block boundary.
 12. The methodaccording to claim 11, wherein the second deblocking filter isconfigured to filter six neighboring pixels, and the first deblockingfilter is configured to filter four neighboring pixels.
 13. The methodaccording to claim 8 or 10, further comprising: transforming the imageto generate transform coefficient data; quantizing the transformcoefficient data to generate quantized data; and performing anarithmetic encoding process on the quantized data.
 14. The imageprocessing method according to claim 8, wherein the second clippingvalue is an integer multiple of the first clipping value.
 15. Anon-transitory computer-readable medium that stores a program that whenexecuted by an image processing device, causes the image processingdevice to perform a method comprising: applying a deblocking filterincluding a first deblocking filter and a second deblocking filter,which is different from the first deblocking filter and has a strongerfilter strength than the first deblocking filter, to neighboring pixelsneighboring a block boundary within a decoded image generated by thecircuitry; controlling, as a condition that the second deblocking filteris applied, the second deblocking filter so as to apply a secondclipping process to a difference value changed by the second deblockingfilter using a second clipping value to generate a filtered image; andencoding an image using the filtered image, wherein a first clippingprocess is applied using a first clipping value as a condition that thefirst deblocking filter is applied, and the second clipping process isapplied according to the following expressions: $\begin{matrix}{{{p\; 0^{\prime}} = {{p\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} - {6^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{p\; 0} - {pv}})} - {({{p\; 0} + {pv}})}}\left( {\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 0} - {pv}},{{p\; 0} + {pv}},\left( {{p\; 2} + {2^{*}p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {q\; 1} +} \right.} \right.}} \\{\left. {\left. 4 \right) ⪢ 3} \right);} \\{{{p\; 1^{\prime}} = {{p\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 2} - {3^{*}p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 1} - {pv}})} - {({{p\; 1} + {pv}})}}\left( {\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{p\; 1} - {pv}},{{p\; 1} + {pv}},{\left( {{p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 2} \right) ⪢ 2}} \right)}};} \\{{{p\; 2^{\prime}} = {{p\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{2^{*}p\; 3} - {5^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{p\; 2} - {pv}})} - {({{p\; 2} + {pv}})}}\left( {\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{p\; 2} - {pv}},{{p\; 2} + {pv}},\left( {{2^{*}p\; 3} + {3^{*}p\; 2} + {p\; 1} + {p\; 0} + {q\; 0} +} \right.} \right.}} \\{\left. {\left. 4 \right) ⪢ 3} \right);} \\{{{q\; 0^{\prime}} = {{q\; 0} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} - {6^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 0} - {pv}})} - {({{q\; 0} + {pv}})}}\left( {\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{q\; 0} - {pv}},{{q\; 0} + {pv}},\left( {{p\; 1} + {2^{*}p\; 0} + {2^{*}q\; 0} + {2^{*}q\; 1} + {q\; 2} +} \right.} \right.}} \\{{\left. 4 \right) ⪢ 3};} \\{{{q\; 1^{\prime}} = {{q\; 1} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} - {3^{*}q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}}};} \\{{= {{Clip}_{{({{q\; 1} - {pv}})} - {({{q\; 1} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2} \right)}};} \\{{= {{Clip}\; 3\left( {{{q\; 1} - {pv}},{{q\; 1} + {pv}},{\left( {{p\; 0} + {q\; 0} + {q\; 1} + {q\; 2} + 2} \right) ⪢ 2}} \right)}};} \\{{{q\; 2^{\prime}} = {{q\; 2} + {{Clip}_{{({- {pv}})} - {({pv})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} - {5^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}}};} \\{{= {{Clip}_{{({{q\; 2} - {pv}})} - {({{q\; 2} + {pv}})}}\left( {\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} + 4} \right) ⪢ 3} \right)}};} \\{= {{Clip}\; 3\left( {{{q\; 2} - {pv}},{{q\; 2} + {pv}},\left( {{p\; 0} + {q\; 0} + {q\; 1} + {3^{*}q\; 2} + {2^{*}q\; 3} +} \right.} \right.}} \\{\left. {\left. 4 \right) ⪢ 3} \right);}\end{matrix}$ where p0′, p1′, p2′, q0′, q1′ and q2′ are pixels filteredby the second deblocking filter, p0, p1, p2, q0, q1 and q2 are pixels ofthe decoded image data, and pv is the second clipping value.